(function($){ 'use strict'; if(typeof wpcf7==='undefined'||wpcf7===null){ return; } wpcf7=$.extend({ cached: 0, inputs: [] }, wpcf7); $(function(){ wpcf7.supportHtml5=(function(){ var features={}; var input=document.createElement('input'); features.placeholder='placeholder' in input; var inputTypes=[ 'email', 'url', 'tel', 'number', 'range', 'date' ]; $.each(inputTypes, function(index, value){ input.setAttribute('type', value); features[ value ]=input.type!=='text'; }); return features; })(); $('div.wpcf7 > form').each(function(){ var $form=$(this); wpcf7.initForm($form); if(wpcf7.cached){ wpcf7.refill($form); }}); }); wpcf7.getId=function(form){ return parseInt($('input[name="_wpcf7"]', form).val(), 10); }; wpcf7.initForm=function(form){ var $form=$(form); $form.submit(function(event){ if(! wpcf7.supportHtml5.placeholder){ $('[placeholder].placeheld', $form).each(function(i, n){ $(n).val('').removeClass('placeheld'); }); } if(typeof window.FormData==='function'){ wpcf7.submit($form); event.preventDefault(); }}); $('.wpcf7-submit', $form).after(''); wpcf7.toggleSubmit($form); $form.on('click', '.wpcf7-acceptance', function(){ wpcf7.toggleSubmit($form); }); $('.wpcf7-exclusive-checkbox', $form).on('click', 'input:checkbox', function(){ var name=$(this).attr('name'); $form.find('input:checkbox[name="' + name + '"]').not(this).prop('checked', false); }); $('.wpcf7-list-item.has-free-text', $form).each(function(){ var $freetext=$(':input.wpcf7-free-text', this); var $wrap=$(this).closest('.wpcf7-form-control'); if($(':checkbox, :radio', this).is(':checked')){ $freetext.prop('disabled', false); }else{ $freetext.prop('disabled', true); } $wrap.on('change', ':checkbox, :radio', function(){ var $cb=$('.has-free-text', $wrap).find(':checkbox, :radio'); if($cb.is(':checked')){ $freetext.prop('disabled', false).focus(); }else{ $freetext.prop('disabled', true); }}); }); if(! wpcf7.supportHtml5.placeholder){ $('[placeholder]', $form).each(function(){ $(this).val($(this).attr('placeholder')); $(this).addClass('placeheld'); $(this).focus(function(){ if($(this).hasClass('placeheld')){ $(this).val('').removeClass('placeheld'); }}); $(this).blur(function(){ if(''===$(this).val()){ $(this).val($(this).attr('placeholder')); $(this).addClass('placeheld'); }}); }); } if(wpcf7.jqueryUi&&! wpcf7.supportHtml5.date){ $form.find('input.wpcf7-date[type="date"]').each(function(){ $(this).datepicker({ dateFormat: 'yy-mm-dd', minDate: new Date($(this).attr('min')), maxDate: new Date($(this).attr('max')) }); }); } if(wpcf7.jqueryUi&&! wpcf7.supportHtml5.number){ $form.find('input.wpcf7-number[type="number"]').each(function(){ $(this).spinner({ min: $(this).attr('min'), max: $(this).attr('max'), step: $(this).attr('step') }); }); } $('.wpcf7-character-count', $form).each(function(){ var $count=$(this); var name=$count.attr('data-target-name'); var down=$count.hasClass('down'); var starting=parseInt($count.attr('data-starting-value'), 10); var maximum=parseInt($count.attr('data-maximum-value'), 10); var minimum=parseInt($count.attr('data-minimum-value'), 10); var updateCount=function(target){ var $target=$(target); var length=$target.val().length; var count=down ? starting - length:length; $count.attr('data-current-value', count); $count.text(count); if(maximum&&maximum < length){ $count.addClass('too-long'); }else{ $count.removeClass('too-long'); } if(minimum&&length < minimum){ $count.addClass('too-short'); }else{ $count.removeClass('too-short'); }}; $(':input[name="' + name + '"]', $form).each(function(){ updateCount(this); $(this).keyup(function(){ updateCount(this); }); }); }); $form.on('change', '.wpcf7-validates-as-url', function(){ var val=$.trim($(this).val()); if(val && ! val.match(/^[a-z][a-z0-9.+-]*:/i) && -1!==val.indexOf('.')){ val=val.replace(/^\/+/, ''); val='http://' + val; } $(this).val(val); }); }; wpcf7.submit=function(form){ if(typeof window.FormData!=='function'){ return; } var $form=$(form); $('.ajax-loader', $form).addClass('is-active'); wpcf7.clearResponse($form); var formData=new FormData($form.get(0)); var detail={ id: $form.closest('div.wpcf7').attr('id'), status: 'init', inputs: [], formData: formData }; $.each($form.serializeArray(), function(i, field){ if('_wpcf7'==field.name){ detail.contactFormId=field.value; }else if('_wpcf7_version'==field.name){ detail.pluginVersion=field.value; }else if('_wpcf7_locale'==field.name){ detail.contactFormLocale=field.value; }else if('_wpcf7_unit_tag'==field.name){ detail.unitTag=field.value; }else if('_wpcf7_container_post'==field.name){ detail.containerPostId=field.value; }else if(field.name.match(/^_wpcf7_\w+_free_text_/)){ var owner=field.name.replace(/^_wpcf7_\w+_free_text_/, ''); detail.inputs.push({ name: owner + '-free-text', value: field.value }); }else if(field.name.match(/^_/)){ }else{ detail.inputs.push(field); }}); wpcf7.triggerEvent($form.closest('div.wpcf7'), 'beforesubmit', detail); var ajaxSuccess=function(data, status, xhr, $form){ detail.id=$(data.into).attr('id'); detail.status=data.status; detail.apiResponse=data; var $message=$('.wpcf7-response-output', $form); switch(data.status){ case 'validation_failed': $.each(data.invalidFields, function(i, n){ $(n.into, $form).each(function(){ wpcf7.notValidTip(this, n.message); $('.wpcf7-form-control', this).addClass('wpcf7-not-valid'); $('[aria-invalid]', this).attr('aria-invalid', 'true'); }); }); $message.addClass('wpcf7-validation-errors'); $form.addClass('invalid'); wpcf7.triggerEvent(data.into, 'invalid', detail); break; case 'acceptance_missing': $message.addClass('wpcf7-acceptance-missing'); $form.addClass('unaccepted'); wpcf7.triggerEvent(data.into, 'unaccepted', detail); break; case 'spam': $message.addClass('wpcf7-spam-blocked'); $form.addClass('spam'); wpcf7.triggerEvent(data.into, 'spam', detail); break; case 'aborted': $message.addClass('wpcf7-aborted'); $form.addClass('aborted'); wpcf7.triggerEvent(data.into, 'aborted', detail); break; case 'mail_sent': $message.addClass('wpcf7-mail-sent-ok'); $form.addClass('sent'); wpcf7.triggerEvent(data.into, 'mailsent', detail); break; case 'mail_failed': $message.addClass('wpcf7-mail-sent-ng'); $form.addClass('failed'); wpcf7.triggerEvent(data.into, 'mailfailed', detail); break; default: var customStatusClass='custom-' + data.status.replace(/[^0-9a-z]+/i, '-'); $message.addClass('wpcf7-' + customStatusClass); $form.addClass(customStatusClass); } wpcf7.refill($form, data); wpcf7.triggerEvent(data.into, 'submit', detail); if('mail_sent'==data.status){ $form.each(function(){ this.reset(); }); wpcf7.toggleSubmit($form); } if(! wpcf7.supportHtml5.placeholder){ $form.find('[placeholder].placeheld').each(function(i, n){ $(n).val($(n).attr('placeholder')); }); } $message.html('').append(data.message).slideDown('fast'); $message.attr('role', 'alert'); $('.screen-reader-response', $form.closest('.wpcf7')).each(function(){ var $response=$(this); $response.html('').attr('role', '').append(data.message); if(data.invalidFields){ var $invalids=$(''); $.each(data.invalidFields, function(i, n){ if(n.idref){ var $li=$('
  • ').append($('').attr('href', '#' + n.idref).append(n.message)); }else{ var $li=$('
  • ').append(n.message); } $invalids.append($li); }); $response.append($invalids); } $response.attr('role', 'alert').focus(); }); }; $.ajax({ type: 'POST', url: wpcf7.apiSettings.getRoute('/contact-forms/' + wpcf7.getId($form) + '/feedback'), data: formData, dataType: 'json', processData: false, contentType: false }).done(function(data, status, xhr){ ajaxSuccess(data, status, xhr, $form); $('.ajax-loader', $form).removeClass('is-active'); }).fail(function(xhr, status, error){ var $e=$('
    ').text(error.message); $form.after($e); }); }; wpcf7.triggerEvent=function(target, name, detail){ var $target=$(target); var event=new CustomEvent('wpcf7' + name, { bubbles: true, detail: detail }); $target.get(0).dispatchEvent(event); $target.trigger('wpcf7:' + name, detail); $target.trigger(name + '.wpcf7', detail); }; wpcf7.toggleSubmit=function(form, state){ var $form=$(form); var $submit=$('input:submit', $form); if(typeof state!=='undefined'){ $submit.prop('disabled', ! state); return; } if($form.hasClass('wpcf7-acceptance-as-validation')){ return; } $submit.prop('disabled', false); $('.wpcf7-acceptance', $form).each(function(){ var $span=$(this); var $input=$('input:checkbox', $span); if(! $span.hasClass('optional')){ if($span.hasClass('invert')&&$input.is(':checked') || ! $span.hasClass('invert')&&! $input.is(':checked')){ $submit.prop('disabled', true); return false; }} }); }; wpcf7.notValidTip=function(target, message){ var $target=$(target); $('.wpcf7-not-valid-tip', $target).remove(); $('') .text(message).appendTo($target); if($target.is('.use-floating-validation-tip *')){ var fadeOut=function(target){ $(target).not(':hidden').animate({ opacity: 0 }, 'fast', function(){ $(this).css({ 'z-index': -100 }); }); }; $target.on('mouseover', '.wpcf7-not-valid-tip', function(){ fadeOut(this); }); $target.on('focus', ':input', function(){ fadeOut($('.wpcf7-not-valid-tip', $target)); }); }}; wpcf7.refill=function(form, data){ var $form=$(form); var refillCaptcha=function($form, items){ $.each(items, function(i, n){ $form.find(':input[name="' + i + '"]').val(''); $form.find('img.wpcf7-captcha-' + i).attr('src', n); var match=/([0-9]+)\.(png|gif|jpeg)$/.exec(n); $form.find('input:hidden[name="_wpcf7_captcha_challenge_' + i + '"]').attr('value', match[ 1 ]); }); }; var refillQuiz=function($form, items){ $.each(items, function(i, n){ $form.find(':input[name="' + i + '"]').val(''); $form.find(':input[name="' + i + '"]').siblings('span.wpcf7-quiz-label').text(n[ 0 ]); $form.find('input:hidden[name="_wpcf7_quiz_answer_' + i + '"]').attr('value', n[ 1 ]); }); }; if(typeof data==='undefined'){ $.ajax({ type: 'GET', url: wpcf7.apiSettings.getRoute('/contact-forms/' + wpcf7.getId($form) + '/refill'), beforeSend: function(xhr){ var nonce=$form.find(':input[name="_wpnonce"]').val(); if(nonce){ xhr.setRequestHeader('X-WP-Nonce', nonce); }}, dataType: 'json' }).done(function(data, status, xhr){ if(data.captcha){ refillCaptcha($form, data.captcha); } if(data.quiz){ refillQuiz($form, data.quiz); }}); }else{ if(data.captcha){ refillCaptcha($form, data.captcha); } if(data.quiz){ refillQuiz($form, data.quiz); }} }; wpcf7.clearResponse=function(form){ var $form=$(form); $form.removeClass('invalid spam sent failed'); $form.siblings('.screen-reader-response').html('').attr('role', ''); $('.wpcf7-not-valid-tip', $form).remove(); $('[aria-invalid]', $form).attr('aria-invalid', 'false'); $('.wpcf7-form-control', $form).removeClass('wpcf7-not-valid'); $('.wpcf7-response-output', $form) .hide().empty().removeAttr('role') .removeClass('wpcf7-mail-sent-ok wpcf7-mail-sent-ng wpcf7-validation-errors wpcf7-spam-blocked'); }; wpcf7.apiSettings.getRoute=function(path){ var url=wpcf7.apiSettings.root; url=url.replace(wpcf7.apiSettings.namespace, wpcf7.apiSettings.namespace + path); return url; };})(jQuery); (function (){ if(typeof window.CustomEvent==="function") return false; function CustomEvent(event, params){ params=params||{ bubbles: false, cancelable: false, detail: undefined }; var evt=document.createEvent('CustomEvent'); evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail); return evt; } CustomEvent.prototype=window.Event.prototype; window.CustomEvent=CustomEvent; })(); !function(e){"use strict";function n(e){if("undefined"==typeof e.length)o(e,"click",t);else if("string"!=typeof e&&!(e instanceof String))for(var n=0;n0&&i[1]||""}function a(r,e){var i=e.match(r);return i&&i.length>1&&i[2]||""}var t=/version\/(\d+(\.?_?\d+)+)/i;var s=[{test:[/googlebot/i],i:function r(r){var e={name:"Googlebot"};var i=n(/googlebot\/(\d+(\.\d+))/i,r)||n(t,r);if(i){e.version=i}return e}},{test:[/opera/i],i:function r(r){var e={name:"Opera"};var i=n(t,r)||n(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/opr\/|opios/i],i:function r(r){var e={name:"Opera"};var i=n(/(?:opr|opios)[\s/](\S+)/i,r)||n(t,r);if(i){e.version=i}return e}},{test:[/SamsungBrowser/i],i:function r(r){var e={name:"Samsung Internet for Android"};var i=n(t,r)||n(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/Whale/i],i:function r(r){var e={name:"NAVER Whale Browser"};var i=n(t,r)||n(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/MZBrowser/i],i:function r(r){var e={name:"MZ Browser"};var i=n(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,r)||n(t,r);if(i){e.version=i}return e}},{test:[/focus/i],i:function r(r){var e={name:"Focus"};var i=n(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,r)||n(t,r);if(i){e.version=i}return e}},{test:[/swing/i],i:function r(r){var e={name:"Swing"};var i=n(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,r)||n(t,r);if(i){e.version=i}return e}},{test:[/coast/i],i:function r(r){var e={name:"Opera Coast"};var i=n(t,r)||n(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/yabrowser/i],i:function r(r){var e={name:"Yandex Browser"};var i=n(t,r)||n(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/ucbrowser/i],i:function r(r){var e={name:"UC Browser"};var i=n(t,r)||n(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/Maxthon|mxios/i],i:function r(r){var e={name:"Maxthon"};var i=n(t,r)||n(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/epiphany/i],i:function r(r){var e={name:"Epiphany"};var i=n(t,r)||n(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/puffin/i],i:function r(r){var e={name:"Puffin"};var i=n(t,r)||n(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/sleipnir/i],i:function r(r){var e={name:"Sleipnir"};var i=n(t,r)||n(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/k-meleon/i],i:function r(r){var e={name:"K-Meleon"};var i=n(t,r)||n(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/micromessenger/i],i:function r(r){var e={name:"WeChat"};var i=n(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,r)||n(t,r);if(i){e.version=i}return e}},{test:[/msie|trident/i],i:function r(r){var e={name:"Internet Explorer"};var i=n(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/edg([ea]|ios)/i],i:function r(r){var e={name:"Microsoft Edge"};var i=a(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/vivaldi/i],i:function r(r){var e={name:"Vivaldi"};var i=n(/vivaldi\/(\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/seamonkey/i],i:function r(r){var e={name:"SeaMonkey"};var i=n(/seamonkey\/(\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/sailfish/i],i:function r(r){var e={name:"Sailfish"};var i=n(/sailfish\s?browser\/(\d+(\.\d+)?)/i,r);if(i){e.version=i}return e}},{test:[/silk/i],i:function r(r){var e={name:"Amazon Silk"};var i=n(/silk\/(\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/phantom/i],i:function r(r){var e={name:"PhantomJS"};var i=n(/phantomjs\/(\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/slimerjs/i],i:function r(r){var e={name:"SlimerJS"};var i=n(/slimerjs\/(\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],i:function r(r){var e={name:"BlackBerry"};var i=n(t,r)||n(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/(web|hpw)[o0]s/i],i:function r(r){var e={name:"WebOS Browser"};var i=n(t,r)||n(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/bada/i],i:function r(r){var e={name:"Bada"};var i=n(/dolfin\/(\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/tizen/i],i:function r(r){var e={name:"Tizen"};var i=n(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,r)||n(t,r);if(i){e.version=i}return e}},{test:[/qupzilla/i],i:function r(r){var e={name:"QupZilla"};var i=n(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,r)||n(t,r);if(i){e.version=i}return e}},{test:[/firefox|iceweasel|fxios/i],i:function r(r){var e={name:"Firefox"};var i=n(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:[/chromium/i],i:function r(r){var e={name:"Chromium"};var i=n(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,r)||n(t,r);if(i){e.version=i}return e}},{test:[/chrome|crios|crmo/i],i:function r(r){var e={name:"Chrome"};var i=n(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,r);if(i){e.version=i}return e}},{test:function e(r){var e=!/like android/i.test(r);var i=/android/i.test(r);return e&&i},i:function r(r){var e={name:"Android Browser"};var i=n(t,r);if(i){e.version=i}return e}},{test:[/safari|applewebkit/i],i:function r(r){var e={name:"Safari"};var i=n(t,r);if(i){e.version=i}return e}},{test:[/.*/i],i:function r(r){return{name:n(/^(.*)\/(.*) /,r),version:a(/^(.*)\/(.*) /,r)}}}];function i(r,e){var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;var n=d(r);var a=d(e);var t=Math.max(n,a);var s=0;var o=f([r,e],function(r){var e=t-d(r);var i=r+new Array(e+1).join(".0");return f(i.split("."),function(r){return new Array(20-r.length).join("0")+r}).reverse()});if(i){s=t-Math.min(n,a)}t-=1;while(t>=s){if(o[0][t]>o[1][t]){return 1}if(o[0][t]===o[1][t]){if(t===s){return 0}t-=1}else if(o[0][t]0){w+=" noopener"}else{w+="noopener"}l.setAttribute("rel",w)}}else{blankshield(document.querySelectorAll("a[target=_blank]"))}}); !function(factory){ "function"==typeof define&&define.amd ? define([ "jquery" ], factory):factory("object"==typeof exports ? require("jquery"):jQuery); }(function($){ var caretTimeoutId, ua=navigator.userAgent, iPhone=/iphone/i.test(ua), chrome=/chrome/i.test(ua), android=/android/i.test(ua); $.mask={ definitions: { "_": "[0-9]", }, autoclear: !0, dataName: "mask", placeholder: "_" }, $.fn.extend({ caret: function(begin, end){ var range; if(0!==this.length&&!this.is(":hidden")) return "number"==typeof begin ? (end="number"==typeof end ? end:begin, this.each(function(){ this.setSelectionRange ? this.setSelectionRange(begin, end):this.createTextRange&&(range=this.createTextRange(), range.collapse(!0), range.moveEnd("character", end), range.moveStart("character", begin), range.select()); })):(this[0].setSelectionRange ? (begin=this[0].selectionStart, end=this[0].selectionEnd):document.selection&&document.selection.createRange&&(range=document.selection.createRange(), begin=0 - range.duplicate().moveStart("character", -1e5), end=begin + range.text.length), { begin: begin, end: end }); }, unmask: function(){ return this.trigger("unmask"); }, mask: function(mask, settings){ var input, defs, tests, partialPosition, firstNonMaskPos, lastRequiredNonMaskPos, len, oldVal; if(!mask&&this.length > 0){ input=$(this[0]); var fn=input.data($.mask.dataName); return fn ? fn():void 0; } return settings=$.extend({ autoclear: $.mask.autoclear, placeholder: $.mask.placeholder, completed: null }, settings), defs=$.mask.definitions, tests=[], partialPosition=len=mask.length, firstNonMaskPos=null, $.each(mask.split(""), function(i, c){ "?"==c ? (len--, partialPosition=i):defs[c] ? (tests.push(new RegExp(defs[c])), null===firstNonMaskPos&&(firstNonMaskPos=tests.length - 1), partialPosition > i&&(lastRequiredNonMaskPos=tests.length - 1)):tests.push(null); }), this.trigger("unmask").each(function(){ function tryFireCompleted(){ if(settings.completed){ for (var i=firstNonMaskPos; lastRequiredNonMaskPos >=i; i++) if(tests[i]&&buffer[i]===getPlaceholder(i)) return; settings.completed.call(input); }} function getPlaceholder(i){ return settings.placeholder.charAt(i < settings.placeholder.length ? i:0); } function seekNext(pos){ for (;++pos < len&&!tests[pos];) ; return pos; } function seekPrev(pos){ for (;--pos >=0&&!tests[pos];) ; return pos; } function shiftL(begin, end){ var i, j; if(!(0 > begin)){ for (i=begin, j=seekNext(end); len > i; i++) if(tests[i]){ if(!(len > j&&tests[i].test(buffer[j]))) break; buffer[i]=buffer[j], buffer[j]=getPlaceholder(j), j=seekNext(j); } writeBuffer(), input.caret(Math.max(firstNonMaskPos, begin)); }} function shiftR(pos){ var i, c, j, t; for (i=pos, c=getPlaceholder(pos); len > i; i++) if(tests[i]){ if(j=seekNext(i), t=buffer[i], buffer[i]=c, !(len > j&&tests[j].test(t))) break; c=t; }} function androidInputEvent(){ var curVal=input.val(), pos=input.caret(); if(oldVal&&oldVal.length&&oldVal.length > curVal.length){ for (checkVal(!0); pos.begin > 0&&!tests[pos.begin - 1];) pos.begin--; if(0===pos.begin) for (;pos.begin < firstNonMaskPos&&!tests[pos.begin];) pos.begin++; input.caret(pos.begin, pos.begin); }else{ for (checkVal(!0); pos.begin < len&&!tests[pos.begin];) pos.begin++; input.caret(pos.begin, pos.begin); } tryFireCompleted(); } function blurEvent(){ checkVal(), input.val()!=focusText&&input.change(); } function keydownEvent(e){ if(!input.prop("readonly")){ var pos, begin, end, k=e.which||e.keyCode; oldVal=input.val(), 8===k||46===k||iPhone&&127===k ? (pos=input.caret(), begin=pos.begin, end=pos.end, end - begin===0&&(begin=46!==k ? seekPrev(begin):end=seekNext(begin - 1), end=46===k ? seekNext(end):end), clearBuffer(begin, end), shiftL(begin, end - 1), e.preventDefault()):13===k ? blurEvent.call(this, e):27===k&&(input.val(focusText), input.caret(0, checkVal()), e.preventDefault()); }} function keypressEvent(e){ if(!input.prop("readonly")){ var p, c, next, k=e.which||e.keyCode, pos=input.caret(); if(!(e.ctrlKey||e.altKey||e.metaKey||32 > k)&&k && 13!==k){ if(pos.end - pos.begin!==0&&(clearBuffer(pos.begin, pos.end), shiftL(pos.begin, pos.end - 1)), p=seekNext(pos.begin - 1), len > p&&(c=String.fromCharCode(k), tests[p].test(c))){ if(shiftR(p), buffer[p]=c, writeBuffer(), next=seekNext(p), android){ var proxy=function(){ $.proxy($.fn.caret, input, next)(); }; setTimeout(proxy, 0); } else input.caret(next); pos.begin <=lastRequiredNonMaskPos&&tryFireCompleted(); } e.preventDefault(); }} } function clearBuffer(start, end){ var i; for (i=start; end > i&&len > i; i++) tests[i]&&(buffer[i]=getPlaceholder(i)); } function writeBuffer(){ input.val(buffer.join("")); } function checkVal(allow){ var i, c, pos, test=input.val(), lastMatch=-1; for (i=0, pos=0; len > i; i++) if(tests[i]){ for (buffer[i]=getPlaceholder(i); pos++ < test.length;) if(c=test.charAt(pos - 1), tests[i].test(c)){ buffer[i]=c, lastMatch=i; break; } if(pos > test.length){ clearBuffer(i + 1, len); break; }} else buffer[i]===test.charAt(pos)&&pos++, partialPosition > i&&(lastMatch=i); return allow ? writeBuffer():partialPosition > lastMatch + 1 ? settings.autoclear||buffer.join("")===defaultBuffer ? (input.val()&&input.val(""), clearBuffer(0, len)):writeBuffer():(writeBuffer(), input.val(input.val().substring(0, lastMatch + 1))), partialPosition ? i:firstNonMaskPos; } var input=$(this), buffer=$.map(mask.split(""), function(c, i){ return "?"!=c ? defs[c] ? getPlaceholder(i):c : void 0; }), defaultBuffer=buffer.join(""), focusText=input.val(); input.data($.mask.dataName, function(){ return $.map(buffer, function(c, i){ return tests[i]&&c!=getPlaceholder(i) ? c:null; }).join(""); }), input.one("unmask", function(){ input.off(".mask").removeData($.mask.dataName); }).on("focus.mask", function(){ if(!input.prop("readonly")){ clearTimeout(caretTimeoutId); var pos; focusText=input.val(), pos=checkVal(), caretTimeoutId=setTimeout(function(){ input.get(0)===document.activeElement&&(writeBuffer(), pos==mask.replace("?", "").length ? input.caret(0, pos):input.caret(pos)); }, 10); }}).on("blur.mask", blurEvent).on("keydown.mask", keydownEvent).on("keypress.mask", keypressEvent).on("input.mask paste.mask", function(){ input.prop("readonly")||setTimeout(function(){ var pos=checkVal(!0); input.caret(pos), tryFireCompleted(); }, 0); }), chrome&&android&&input.off("input.mask").on("input.mask", androidInputEvent), checkVal(); }); }}); $(document).ready(function(){ var $fields=$('.wpcf7-mask'); if(! $fields.length){ return false; } $fields.each(function(){ var $this=$(this), mask=$this.data('mask'); if(!mask){ return; } $this.mask(mask, { 'autoclear': getOption($this.data('autoclear')), }); if('tel'!=$this.attr('type')&&-1==mask.indexOf('.')){ $this.attr({ 'inputmode': 'numeric', }); }}); }); function getOption(valule){ if(typeof valule=='undefined'){ return 0; } return valule; }}); ;(function (factory){ var registeredInModuleLoader; if(typeof define==='function'&&define.amd){ define(factory); registeredInModuleLoader=true; } if(typeof exports==='object'){ module.exports=factory(); registeredInModuleLoader=true; } if(!registeredInModuleLoader){ var OldCookies=window.Cookies; var api=window.Cookies=factory(); api.noConflict=function (){ window.Cookies=OldCookies; return api; };}}(function (){ function extend (){ var i=0; var result={}; for (; i < arguments.length; i++){ var attributes=arguments[ i ]; for (var key in attributes){ result[key]=attributes[key]; }} return result; } function decode (s){ return s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent); } function init (converter){ function api(){} function set (key, value, attributes){ if(typeof document==='undefined'){ return; } attributes=extend({ path: '/' }, api.defaults, attributes); if(typeof attributes.expires==='number'){ attributes.expires=new Date(new Date() * 1 + attributes.expires * 864e+5); } attributes.expires=attributes.expires ? attributes.expires.toUTCString():''; try { var result=JSON.stringify(value); if(/^[\{\[]/.test(result)){ value=result; }} catch (e){} value=converter.write ? converter.write(value, key) : encodeURIComponent(String(value)) .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent); key=encodeURIComponent(String(key)) .replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent) .replace(/[\(\)]/g, escape); var stringifiedAttributes=''; for (var attributeName in attributes){ if(!attributes[attributeName]){ continue; } stringifiedAttributes +='; ' + attributeName; if(attributes[attributeName]===true){ continue; } stringifiedAttributes +='=' + attributes[attributeName].split(';')[0]; } return (document.cookie=key + '=' + value + stringifiedAttributes); } function get (key, json){ if(typeof document==='undefined'){ return; } var jar={}; var cookies=document.cookie ? document.cookie.split('; '):[]; var i=0; for (; i < cookies.length; i++){ var parts=cookies[i].split('='); var cookie=parts.slice(1).join('='); if(!json&&cookie.charAt(0)==='"'){ cookie=cookie.slice(1, -1); } try { var name=decode(parts[0]); cookie=(converter.read||converter)(cookie, name) || decode(cookie); if(json){ try { cookie=JSON.parse(cookie); } catch (e){}} jar[name]=cookie; if(key===name){ break; }} catch (e){}} return key ? jar[key]:jar; } api.set=set; api.get=function (key){ return get(key, false ); }; api.getJSON=function (key){ return get(key, true ); }; api.remove=function (key, attributes){ set(key, '', extend(attributes, { expires: -1 })); }; api.defaults={}; api.withConverter=init; return api; } return init(function (){}); })); (function($){ "use strict"; var wacuLoader=`
    `; var adminAjaxURL=wacuPublicObj.ajax_url; var buttonIcon=wacuPublicObj.button_icon; var smartPopupInterval=wacuPublicObj.smart_popup_interval; var smartPopupAfter=wacuPublicObj.smart_popup_after; var wacuPopup={ loadView: function(wp_action, loadIn){ jQuery('.wacu-popup__body').html(wacuLoader); $.ajax({ url: adminAjaxURL, type: 'POST', data: { 'action': wp_action }, }) .done(function(response){ jQuery(loadIn).html(response); }); }, trigger: function(){ if(jQuery('.wacu-popup').hasClass('wacu-popup--activate')){ jQuery('.wacu-popup').removeClass('wacu-popup--activate'); jQuery('.wacu-footer .wacu-popup--trigger .wacu-trigger-icons').html(''); }else{ this.loadView('wacu_contact_media_ajax', '.wacu-popup__body'); this.hideTriggerMessage(); jQuery('.wacu-footer .wacu-popup--trigger .wacu-trigger-icons').html(''); jQuery('.wacu-popup').addClass('wacu-popup--activate'); }}, loadEmailForm: function(){ this.loadView('wacu_public_email_form_ajax', '.wacu-popup__body'); }, loadScheduleCall: function(){ this.loadView('wacu_public_schedule_a_call_ajax', '.wacu-popup__body'); }, showTriggerMessage: function(){ jQuery('.wacu-tirgger-message').addClass('wacu-tirgger-message--active'); }, hideTriggerMessage: function(){ jQuery('.wacu-tirgger-message').remove(); }, } function wacuGDPRerror(){ if(wacuPublicObj.is_gdpr!=true) return false; if(jQuery('#wacu-popup-gdpr__checkbox').is(':checked')==false){ jQuery('#wacu-popup-gdpr').addClass('wacu-popup-gdpr--error'); setTimeout(function(){ jQuery('#wacu-popup-gdpr').removeClass('wacu-popup-gdpr--error') }, 1000); return true; }} jQuery('.wacu-popup--trigger').on('click', function(){ wacuPopup.trigger(); var intervalTimeInSec=new Date(new Date().getTime() + smartPopupInterval * 1000); Cookies.set('wacuSmartPopupInterval', smartPopupInterval, { expires: intervalTimeInSec }); }); jQuery(document).on('click', '.wacu-popup-email--trigger', function(){ if(wacuGDPRerror()==true) return; wacuPopup.loadEmailForm(); }); jQuery(document).on('click', '.wacu-popup-schedule-a-call--trigger', function(){ if(wacuGDPRerror()==true) return; wacuPopup.loadScheduleCall(); }); setTimeout(function(){ if(Cookies.get('wacuSmartPopupInterval')!=null) return; wacuPopup.showTriggerMessage(); }, smartPopupAfter * 1000); jQuery(".wacu-tirgger-message").on({ mouseenter: function(){ jQuery('.wacu-tirgger-message--close', this).addClass('wacu-tirgger-message--close-active'); }, mouseleave: function(){ setTimeout(function(){ jQuery('.wacu-tirgger-message .wacu-tirgger-message--close').removeClass('wacu-tirgger-message--close-active'); }, 5000); }}); jQuery('.wacu-tirgger-message--close').on('click', function(){ wacuPopup.hideTriggerMessage(); var intervalTimeInSec=new Date(new Date().getTime() + smartPopupInterval * 1000); Cookies.set('wacuSmartPopupInterval', smartPopupInterval, { expires: intervalTimeInSec }); }); jQuery(document).on('submit', '#wacu-popup-email-form', function(event){ event.preventDefault(); var wacu_email_name=jQuery('[name=wacu_email_name]'); var wacu_email_email=jQuery('[name=wacu_email_email]'); var wacu_email_message=jQuery('[name=wacu_email_message]'); wacu_email_name.removeClass('wacu-input-error'); wacu_email_email.removeClass('wacu-input-error'); wacu_email_message.removeClass('wacu-input-error'); if(wacu_email_name.val()==''||wacu_email_email.val()==''||wacu_email_message.val()==''){ if(wacu_email_name.val()=='') wacu_email_name.addClass('wacu-input-error'); if(wacu_email_email.val()=='') wacu_email_email.addClass('wacu-input-error'); if(wacu_email_message.val()=='') wacu_email_message.addClass('wacu-input-error'); return; } jQuery('.wacu-popup__body').html(wacuLoader); $.ajax({ url: wacuPublicObj.ajax_url, type: 'POST', data: { 'action': 'wacu_public_send_email_ajax', 'name': wacu_email_name.val(), 'email': wacu_email_email.val(), 'message': wacu_email_message.val(), }, }) .done(function(response){ jQuery('.wacu-popup__body').html(response); }); }); jQuery(document).on('submit', '#wacu-schedule-a-call', function(event){ event.preventDefault(); var wacu_schedule_name=jQuery('[name=wacu_schedule_name]'); var wacu_schedule_country=jQuery('[name=wacu_schedule_country]'); var wacu_schedule_callback_number=jQuery('[name=wacu_schedule_callback_number]'); var wacu_schedule_month=jQuery('[name=wacu_schedule_month]'); var wacu_schedule_date=jQuery('[name=wacu_schedule_date]'); var wacu_schedule_time=jQuery('[name=wacu_schedule_time]'); var wacu_schedule_message=jQuery('[name=wacu_schedule_callback_message]'); wacu_schedule_name.removeClass('wacu-input-error'); wacu_schedule_callback_number.removeClass('wacu-input-error'); if(wacu_schedule_name.val()=='' || wacu_schedule_callback_number.val()==''){ if(wacu_schedule_name.val()=='') wacu_schedule_name.addClass('wacu-input-error'); if(wacu_schedule_callback_number.val()=='') wacu_schedule_callback_number.addClass('wacu-input-error'); return; } jQuery('.wacu-popup__body').html(wacuLoader); $.ajax({ url: wacuPublicObj.ajax_url, type: 'POST', data: { 'action': 'wacu_public_send_schedule_email_ajax', 'name': wacu_schedule_name.val(), 'country': wacu_schedule_country.val(), 'callback_number': wacu_schedule_callback_number.val(), 'month': wacu_schedule_month.val(), 'date': wacu_schedule_date.val(), 'time': wacu_schedule_time.val(), 'message': wacu_schedule_message.val(), }, }) .done(function(response){ jQuery('.wacu-popup__body').html(response); }); }); jQuery(document).on('click', '.wacu-contact-media > li', function(event){ if(wacuGDPRerror()==true) event.preventDefault(); }); })(jQuery); (function ($){ $.fn.countTo=function (options){ options=options||{}; return $(this).each(function (){ var settings=$.extend({}, $.fn.countTo.defaults, { from: $(this).data('from'), to: $(this).data('to'), speed: $(this).data('speed'), refreshInterval: $(this).data('refresh-interval'), decimals: $(this).data('decimals'), separator: $(this).data('separator'), }, options); var loops=Math.ceil(settings.speed / settings.refreshInterval), increment=(settings.to - settings.from) / loops; var self=this, $self=$(this), loopCount=0, value=settings.from, data=$self.data('countTo')||{}; $self.data('countTo', data); if(data.interval){ clearInterval(data.interval); } data.interval=setInterval(updateTimer, settings.refreshInterval); render(value); function updateTimer(){ value +=increment; loopCount++; render(value); if(typeof(settings.onUpdate)=='function'){ settings.onUpdate.call(self, value); } if(loopCount >=loops){ $self.removeData('countTo'); clearInterval(data.interval); value=settings.to; if(typeof(settings.onComplete)=='function'){ settings.onComplete.call(self, value); }} } function render(value){ var formattedValue=settings.formatter.call(self, value, settings); $self.text(formattedValue); }}); }; $.fn.countTo.defaults={ from: 0, to: 0, speed: 1000, refreshInterval: 100, decimals: 0, formatter: formatter, separator: ',', onUpdate: null, onComplete: null }; function addCommas(settings,nStr){ nStr +=''; x=nStr.split('.'); x1=x[0]; x2=x.length > 1 ? '.' + x[1]:''; var rgx=/(\d+)(\d{3})/; while (rgx.test(x1)){ x1=x1.replace(rgx, '$1' + settings.separator + '$2'); } return x1 + x2; } function formatter(value, settings){ return addCommas(settings,value.toFixed(settings.decimals)); }}(jQuery)); ;(function($, window, document, undefined){ function Owl(element, options){ this.settings=null; this.options=$.extend({}, Owl.Defaults, options); this.$element=$(element); this._handlers={}; this._plugins={}; this._supress={}; this._current=null; this._speed=null; this._coordinates=[]; this._breakpoint=null; this._width=null; this._items=[]; this._clones=[]; this._mergers=[]; this._widths=[]; this._invalidated={}; this._pipe=[]; this._drag={ time: null, target: null, pointer: null, stage: { start: null, current: null }, direction: null }; this._states={ current: {}, tags: { 'initializing': [ 'busy' ], 'animating': [ 'busy' ], 'dragging': [ 'interacting' ] }}; $.each([ 'onResize', 'onThrottledResize' ], $.proxy(function(i, handler){ this._handlers[handler]=$.proxy(this[handler], this); }, this)); $.each(Owl.Plugins, $.proxy(function(key, plugin){ this._plugins[key.charAt(0).toLowerCase() + key.slice(1)] = new plugin(this); }, this)); $.each(Owl.Workers, $.proxy(function(priority, worker){ this._pipe.push({ 'filter': worker.filter, 'run': $.proxy(worker.run, this) }); }, this)); this.setup(); this.initialize(); } Owl.Defaults={ items: 3, loop: false, center: false, rewind: false, checkVisibility: true, mouseDrag: true, touchDrag: true, pullDrag: true, freeDrag: false, margin: 0, stagePadding: 0, merge: false, mergeFit: true, autoWidth: false, startPosition: 0, rtl: false, smartSpeed: 250, fluidSpeed: false, dragEndSpeed: false, responsive: {}, responsiveRefreshRate: 200, responsiveBaseElement: window, fallbackEasing: 'swing', slideTransition: '', info: false, nestedItemSelector: false, itemElement: 'div', stageElement: 'div', refreshClass: 'owl-refresh', loadedClass: 'owl-loaded', loadingClass: 'owl-loading', rtlClass: 'owl-rtl', responsiveClass: 'owl-responsive', dragClass: 'owl-drag', itemClass: 'owl-item', stageClass: 'owl-stage', stageOuterClass: 'owl-stage-outer', grabClass: 'owl-grab' }; Owl.Width={ Default: 'default', Inner: 'inner', Outer: 'outer' }; Owl.Type={ Event: 'event', State: 'state' }; Owl.Plugins={}; Owl.Workers=[ { filter: [ 'width', 'settings' ], run: function(){ this._width=this.$element.width(); }}, { filter: [ 'width', 'items', 'settings' ], run: function(cache){ cache.current=this._items&&this._items[this.relative(this._current)]; }}, { filter: [ 'items', 'settings' ], run: function(){ this.$stage.children('.cloned').remove(); }}, { filter: [ 'width', 'items', 'settings' ], run: function(cache){ var margin=this.settings.margin||'', grid = !this.settings.autoWidth, rtl=this.settings.rtl, css={ 'width': 'auto', 'margin-left': rtl ? margin:'', 'margin-right': rtl ? '':margin }; !grid&&this.$stage.children().css(css); cache.css=css; }}, { filter: [ 'width', 'items', 'settings' ], run: function(cache){ var width=(this.width() / this.settings.items).toFixed(3) - this.settings.margin, merge=null, iterator=this._items.length, grid = !this.settings.autoWidth, widths=[]; cache.items={ merge: false, width: width }; while (iterator--){ merge=this._mergers[iterator]; merge=this.settings.mergeFit&&Math.min(merge, this.settings.items)||merge; cache.items.merge=merge > 1||cache.items.merge; widths[iterator] = !grid ? this._items[iterator].width():width * merge; } this._widths=widths; }}, { filter: [ 'items', 'settings' ], run: function(){ var clones=[], items=this._items, settings=this.settings, view=Math.max(settings.items * 2, 4), size=Math.ceil(items.length / 2) * 2, repeat=settings.loop&&items.length ? settings.rewind ? view:Math.max(view, size):0, append='', prepend=''; repeat /=2; while (repeat > 0){ clones.push(this.normalize(clones.length / 2, true)); append=append + items[clones[clones.length - 1]][0].outerHTML; clones.push(this.normalize(items.length - 1 - (clones.length - 1) / 2, true)); prepend=items[clones[clones.length - 1]][0].outerHTML + prepend; repeat -=1; } this._clones=clones; $(append).addClass('cloned').appendTo(this.$stage); $(prepend).addClass('cloned').prependTo(this.$stage); }}, { filter: [ 'width', 'items', 'settings' ], run: function(){ var rtl=this.settings.rtl ? 1:-1, size=this._clones.length + this._items.length, iterator=-1, previous=0, current=0, coordinates=[]; while (++iterator < size){ previous=coordinates[iterator - 1]||0; current=this._widths[this.relative(iterator)] + this.settings.margin; coordinates.push(previous + current * rtl); } this._coordinates=coordinates; }}, { filter: [ 'width', 'items', 'settings' ], run: function(){ var padding=this.settings.stagePadding, coordinates=this._coordinates, css={ 'width': Math.ceil(Math.abs(coordinates[coordinates.length - 1])) + padding * 2, 'padding-left': padding||'', 'padding-right': padding||'' }; this.$stage.css(css); }}, { filter: [ 'width', 'items', 'settings' ], run: function(cache){ var iterator=this._coordinates.length, grid = !this.settings.autoWidth, items=this.$stage.children(); if(grid&&cache.items.merge){ while (iterator--){ cache.css.width=this._widths[this.relative(iterator)]; items.eq(iterator).css(cache.css); }}else if(grid){ cache.css.width=cache.items.width; items.css(cache.css); }} }, { filter: [ 'items' ], run: function(){ this._coordinates.length < 1&&this.$stage.removeAttr('style'); }}, { filter: [ 'width', 'items', 'settings' ], run: function(cache){ cache.current=cache.current ? this.$stage.children().index(cache.current):0; cache.current=Math.max(this.minimum(), Math.min(this.maximum(), cache.current)); this.reset(cache.current); }}, { filter: [ 'position' ], run: function(){ this.animate(this.coordinates(this._current)); }}, { filter: [ 'width', 'position', 'items', 'settings' ], run: function(){ var rtl=this.settings.rtl ? 1:-1, padding=this.settings.stagePadding * 2, begin=this.coordinates(this.current()) + padding, end=begin + this.width() * rtl, inner, outer, matches=[], i, n; for (i=0, n=this._coordinates.length; i < n; i++){ inner=this._coordinates[i - 1]||0; outer=Math.abs(this._coordinates[i]) + padding * rtl; if((this.op(inner, '<=', begin)&&(this.op(inner, '>', end))) || (this.op(outer, '<', begin)&&this.op(outer, '>', end))){ matches.push(i); }} this.$stage.children('.active').removeClass('active'); this.$stage.children(':eq(' + matches.join('), :eq(') + ')').addClass('active'); this.$stage.children('.center').removeClass('center'); if(this.settings.center){ this.$stage.children().eq(this.current()).addClass('center'); }} } ]; Owl.prototype.initializeStage=function(){ this.$stage=this.$element.find('.' + this.settings.stageClass); if(this.$stage.length){ return; } this.$element.addClass(this.options.loadingClass); this.$stage=$('<' + this.settings.stageElement + '>', { "class": this.settings.stageClass }).wrap($('
    ', { "class": this.settings.stageOuterClass })); this.$element.append(this.$stage.parent()); }; Owl.prototype.initializeItems=function(){ var $items=this.$element.find('.owl-item'); if($items.length){ this._items=$items.get().map(function(item){ return $(item); }); this._mergers=this._items.map(function(){ return 1; }); this.refresh(); return; } this.replace(this.$element.children().not(this.$stage.parent())); if(this.isVisible()){ this.refresh(); }else{ this.invalidate('width'); } this.$element .removeClass(this.options.loadingClass) .addClass(this.options.loadedClass); }; Owl.prototype.initialize=function(){ this.enter('initializing'); this.trigger('initialize'); this.$element.toggleClass(this.settings.rtlClass, this.settings.rtl); if(this.settings.autoWidth&&!this.is('pre-loading')){ var imgs, nestedSelector, width; imgs=this.$element.find('img'); nestedSelector=this.settings.nestedItemSelector ? '.' + this.settings.nestedItemSelector:undefined; width=this.$element.children(nestedSelector).width(); if(imgs.length&&width <=0){ this.preloadAutoWidthImages(imgs); }} this.initializeStage(); this.initializeItems(); this.registerEventHandlers(); this.leave('initializing'); this.trigger('initialized'); }; Owl.prototype.isVisible=function(){ return this.settings.checkVisibility ? this.$element.is(':visible') : true; }; Owl.prototype.setup=function(){ var viewport=this.viewport(), overwrites=this.options.responsive, match=-1, settings=null; if(!overwrites){ settings=$.extend({}, this.options); }else{ $.each(overwrites, function(breakpoint){ if(breakpoint <=viewport&&breakpoint > match){ match=Number(breakpoint); }}); settings=$.extend({}, this.options, overwrites[match]); if(typeof settings.stagePadding==='function'){ settings.stagePadding=settings.stagePadding(); } delete settings.responsive; if(settings.responsiveClass){ this.$element.attr('class', this.$element.attr('class').replace(new RegExp('(' + this.options.responsiveClass + '-)\\S+\\s', 'g'), '$1' + match) ); }} this.trigger('change', { property: { name: 'settings', value: settings }}); this._breakpoint=match; this.settings=settings; this.invalidate('settings'); this.trigger('changed', { property: { name: 'settings', value: this.settings }}); }; Owl.prototype.optionsLogic=function(){ if(this.settings.autoWidth){ this.settings.stagePadding=false; this.settings.merge=false; }}; Owl.prototype.prepare=function(item){ var event=this.trigger('prepare', { content: item }); if(!event.data){ event.data=$('<' + this.settings.itemElement + '/>') .addClass(this.options.itemClass).append(item) } this.trigger('prepared', { content: event.data }); return event.data; }; Owl.prototype.update=function(){ var i=0, n=this._pipe.length, filter=$.proxy(function(p){ return this[p] }, this._invalidated), cache={}; while (i < n){ if(this._invalidated.all||$.grep(this._pipe[i].filter, filter).length > 0){ this._pipe[i].run(cache); } i++; } this._invalidated={}; !this.is('valid')&&this.enter('valid'); }; Owl.prototype.width=function(dimension){ dimension=dimension||Owl.Width.Default; switch (dimension){ case Owl.Width.Inner: case Owl.Width.Outer: return this._width; default: return this._width - this.settings.stagePadding * 2 + this.settings.margin; }}; Owl.prototype.refresh=function(){ this.enter('refreshing'); this.trigger('refresh'); this.setup(); this.optionsLogic(); this.$element.addClass(this.options.refreshClass); this.update(); this.$element.removeClass(this.options.refreshClass); this.leave('refreshing'); this.trigger('refreshed'); }; Owl.prototype.onThrottledResize=function(){ window.clearTimeout(this.resizeTimer); this.resizeTimer=window.setTimeout(this._handlers.onResize, this.settings.responsiveRefreshRate); }; Owl.prototype.onResize=function(){ if(!this._items.length){ return false; } if(this._width===this.$element.width()){ return false; } if(!this.isVisible()){ return false; } this.enter('resizing'); if(this.trigger('resize').isDefaultPrevented()){ this.leave('resizing'); return false; } this.invalidate('width'); this.refresh(); this.leave('resizing'); this.trigger('resized'); }; Owl.prototype.registerEventHandlers=function(){ if($.support.transition){ this.$stage.on($.support.transition.end + '.owl.core', $.proxy(this.onTransitionEnd, this)); } if(this.settings.responsive!==false){ this.on(window, 'resize', this._handlers.onThrottledResize); } if(this.settings.mouseDrag){ this.$element.addClass(this.options.dragClass); this.$stage.on('mousedown.owl.core', $.proxy(this.onDragStart, this)); this.$stage.on('dragstart.owl.core selectstart.owl.core', function(){ return false }); } if(this.settings.touchDrag){ this.$stage.on('touchstart.owl.core', $.proxy(this.onDragStart, this)); this.$stage.on('touchcancel.owl.core', $.proxy(this.onDragEnd, this)); }}; Owl.prototype.onDragStart=function(event){ var stage=null; if(event.which===3){ return; } if($.support.transform){ stage=this.$stage.css('transform').replace(/.*\(|\)| /g, '').split(','); stage={ x: stage[stage.length===16 ? 12:4], y: stage[stage.length===16 ? 13:5] };}else{ stage=this.$stage.position(); stage={ x: this.settings.rtl ? stage.left + this.$stage.width() - this.width() + this.settings.margin : stage.left, y: stage.top };} if(this.is('animating')){ $.support.transform ? this.animate(stage.x):this.$stage.stop() this.invalidate('position'); } this.$element.toggleClass(this.options.grabClass, event.type==='mousedown'); this.speed(0); this._drag.time=new Date().getTime(); this._drag.target=$(event.target); this._drag.stage.start=stage; this._drag.stage.current=stage; this._drag.pointer=this.pointer(event); $(document).on('mouseup.owl.core touchend.owl.core', $.proxy(this.onDragEnd, this)); $(document).one('mousemove.owl.core touchmove.owl.core', $.proxy(function(event){ var delta=this.difference(this._drag.pointer, this.pointer(event)); $(document).on('mousemove.owl.core touchmove.owl.core', $.proxy(this.onDragMove, this)); if(Math.abs(delta.x) < Math.abs(delta.y)&&this.is('valid')){ return; } event.preventDefault(); this.enter('dragging'); this.trigger('drag'); }, this)); }; Owl.prototype.onDragMove=function(event){ var minimum=null, maximum=null, pull=null, delta=this.difference(this._drag.pointer, this.pointer(event)), stage=this.difference(this._drag.stage.start, delta); if(!this.is('dragging')){ return; } event.preventDefault(); if(this.settings.loop){ minimum=this.coordinates(this.minimum()); maximum=this.coordinates(this.maximum() + 1) - minimum; stage.x=(((stage.x - minimum) % maximum + maximum) % maximum) + minimum; }else{ minimum=this.settings.rtl ? this.coordinates(this.maximum()):this.coordinates(this.minimum()); maximum=this.settings.rtl ? this.coordinates(this.minimum()):this.coordinates(this.maximum()); pull=this.settings.pullDrag ? -1 * delta.x / 5:0; stage.x=Math.max(Math.min(stage.x, minimum + pull), maximum + pull); } this._drag.stage.current=stage; this.animate(stage.x); }; Owl.prototype.onDragEnd=function(event){ var delta=this.difference(this._drag.pointer, this.pointer(event)), stage=this._drag.stage.current, direction=delta.x > 0 ^ this.settings.rtl ? 'left':'right'; $(document).off('.owl.core'); this.$element.removeClass(this.options.grabClass); if(delta.x!==0&&this.is('dragging')||!this.is('valid')){ this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed); this.current(this.closest(stage.x, delta.x!==0 ? direction:this._drag.direction)); this.invalidate('position'); this.update(); this._drag.direction=direction; if(Math.abs(delta.x) > 3||new Date().getTime() - this._drag.time > 300){ this._drag.target.one('click.owl.core', function(){ return false; }); }} if(!this.is('dragging')){ return; } this.leave('dragging'); this.trigger('dragged'); }; Owl.prototype.closest=function(coordinate, direction){ var position=-1, pull=30, width=this.width(), coordinates=this.coordinates(); if(!this.settings.freeDrag){ $.each(coordinates, $.proxy(function(index, value){ if(direction==='left'&&coordinate > value - pull&&coordinate < value + pull){ position=index; }else if(direction==='right'&&coordinate > value - width - pull&&coordinate < value - width + pull){ position=index + 1; }else if(this.op(coordinate, '<', value) && this.op(coordinate, '>', coordinates[index + 1]!==undefined ? coordinates[index + 1]:value - width)){ position=direction==='left' ? index + 1:index; } return position===-1; }, this)); } if(!this.settings.loop){ if(this.op(coordinate, '>', coordinates[this.minimum()])){ position=coordinate=this.minimum(); }else if(this.op(coordinate, '<', coordinates[this.maximum()])){ position=coordinate=this.maximum(); }} return position; }; Owl.prototype.animate=function(coordinate){ var animate=this.speed() > 0; this.is('animating')&&this.onTransitionEnd(); if(animate){ this.enter('animating'); this.trigger('translate'); } if($.support.transform3d&&$.support.transition){ this.$stage.css({ transform: 'translate3d(' + coordinate + 'px,0px,0px)', transition: (this.speed() / 1000) + 's' + ( this.settings.slideTransition ? ' ' + this.settings.slideTransition:'' ) }); }else if(animate){ this.$stage.animate({ left: coordinate + 'px' }, this.speed(), this.settings.fallbackEasing, $.proxy(this.onTransitionEnd, this)); }else{ this.$stage.css({ left: coordinate + 'px' }); }}; Owl.prototype.is=function(state){ return this._states.current[state]&&this._states.current[state] > 0; }; Owl.prototype.current=function(position){ if(position===undefined){ return this._current; } if(this._items.length===0){ return undefined; } position=this.normalize(position); if(this._current!==position){ var event=this.trigger('change', { property: { name: 'position', value: position }}); if(event.data!==undefined){ position=this.normalize(event.data); } this._current=position; this.invalidate('position'); this.trigger('changed', { property: { name: 'position', value: this._current }}); } return this._current; }; Owl.prototype.invalidate=function(part){ if($.type(part)==='string'){ this._invalidated[part]=true; this.is('valid')&&this.leave('valid'); } return $.map(this._invalidated, function(v, i){ return i }); }; Owl.prototype.reset=function(position){ position=this.normalize(position); if(position===undefined){ return; } this._speed=0; this._current=position; this.suppress([ 'translate', 'translated' ]); this.animate(this.coordinates(position)); this.release([ 'translate', 'translated' ]); }; Owl.prototype.normalize=function(position, relative){ var n=this._items.length, m=relative ? 0:this._clones.length; if(!this.isNumeric(position)||n < 1){ position=undefined; }else if(position < 0||position >=n + m){ position=((position - m / 2) % n + n) % n + m / 2; } return position; }; Owl.prototype.relative=function(position){ position -=this._clones.length / 2; return this.normalize(position, true); }; Owl.prototype.maximum=function(relative){ var settings=this.settings, maximum=this._coordinates.length, iterator, reciprocalItemsWidth, elementWidth; if(settings.loop){ maximum=this._clones.length / 2 + this._items.length - 1; }else if(settings.autoWidth||settings.merge){ iterator=this._items.length; if(iterator){ reciprocalItemsWidth=this._items[--iterator].width(); elementWidth=this.$element.width(); while (iterator--){ reciprocalItemsWidth +=this._items[iterator].width() + this.settings.margin; if(reciprocalItemsWidth > elementWidth){ break; }} } maximum=iterator + 1; }else if(settings.center){ maximum=this._items.length - 1; }else{ maximum=this._items.length - settings.items; } if(relative){ maximum -=this._clones.length / 2; } return Math.max(maximum, 0); }; Owl.prototype.minimum=function(relative){ return relative ? 0:this._clones.length / 2; }; Owl.prototype.items=function(position){ if(position===undefined){ return this._items.slice(); } position=this.normalize(position, true); return this._items[position]; }; Owl.prototype.mergers=function(position){ if(position===undefined){ return this._mergers.slice(); } position=this.normalize(position, true); return this._mergers[position]; }; Owl.prototype.clones=function(position){ var odd=this._clones.length / 2, even=odd + this._items.length, map=function(index){ return index % 2===0 ? even + index / 2:odd - (index + 1) / 2 }; if(position===undefined){ return $.map(this._clones, function(v, i){ return map(i) }); } return $.map(this._clones, function(v, i){ return v===position ? map(i):null }); }; Owl.prototype.speed=function(speed){ if(speed!==undefined){ this._speed=speed; } return this._speed; }; Owl.prototype.coordinates=function(position){ var multiplier=1, newPosition=position - 1, coordinate; if(position===undefined){ return $.map(this._coordinates, $.proxy(function(coordinate, index){ return this.coordinates(index); }, this)); } if(this.settings.center){ if(this.settings.rtl){ multiplier=-1; newPosition=position + 1; } coordinate=this._coordinates[position]; coordinate +=(this.width() - coordinate + (this._coordinates[newPosition]||0)) / 2 * multiplier; }else{ coordinate=this._coordinates[newPosition]||0; } coordinate=Math.ceil(coordinate); return coordinate; }; Owl.prototype.duration=function(from, to, factor){ if(factor===0){ return 0; } return Math.min(Math.max(Math.abs(to - from), 1), 6) * Math.abs((factor||this.settings.smartSpeed)); }; Owl.prototype.to=function(position, speed){ var current=this.current(), revert=null, distance=position - this.relative(current), direction=(distance > 0) - (distance < 0), items=this._items.length, minimum=this.minimum(), maximum=this.maximum(); if(this.settings.loop){ if(!this.settings.rewind&&Math.abs(distance) > items / 2){ distance +=direction * -1 * items; } position=current + distance; revert=((position - minimum) % items + items) % items + minimum; if(revert!==position&&revert - distance <=maximum&&revert - distance > 0){ current=revert - distance; position=revert; this.reset(current); }}else if(this.settings.rewind){ maximum +=1; position=(position % maximum + maximum) % maximum; }else{ position=Math.max(minimum, Math.min(maximum, position)); } this.speed(this.duration(current, position, speed)); this.current(position); if(this.isVisible()){ this.update(); }}; Owl.prototype.next=function(speed){ speed=speed||false; this.to(this.relative(this.current()) + 1, speed); }; Owl.prototype.prev=function(speed){ speed=speed||false; this.to(this.relative(this.current()) - 1, speed); }; Owl.prototype.onTransitionEnd=function(event){ if(event!==undefined){ event.stopPropagation(); if((event.target||event.srcElement||event.originalTarget)!==this.$stage.get(0)){ return false; }} this.leave('animating'); this.trigger('translated'); }; Owl.prototype.viewport=function(){ var width; if(this.options.responsiveBaseElement!==window){ width=$(this.options.responsiveBaseElement).width(); }else if(window.innerWidth){ width=window.innerWidth; }else if(document.documentElement&&document.documentElement.clientWidth){ width=document.documentElement.clientWidth; }else{ console.warn('Can not detect viewport width.'); } return width; }; Owl.prototype.replace=function(content){ this.$stage.empty(); this._items=[]; if(content){ content=(content instanceof jQuery) ? content:$(content); } if(this.settings.nestedItemSelector){ content=content.find('.' + this.settings.nestedItemSelector); } content.filter(function(){ return this.nodeType===1; }).each($.proxy(function(index, item){ item=this.prepare(item); this.$stage.append(item); this._items.push(item); this._mergers.push(item.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1||1); }, this)); this.reset(this.isNumeric(this.settings.startPosition) ? this.settings.startPosition:0); this.invalidate('items'); }; Owl.prototype.add=function(content, position){ var current=this.relative(this._current); position=position===undefined ? this._items.length:this.normalize(position, true); content=content instanceof jQuery ? content:$(content); this.trigger('add', { content: content, position: position }); content=this.prepare(content); if(this._items.length===0||position===this._items.length){ this._items.length===0&&this.$stage.append(content); this._items.length!==0&&this._items[position - 1].after(content); this._items.push(content); this._mergers.push(content.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1||1); }else{ this._items[position].before(content); this._items.splice(position, 0, content); this._mergers.splice(position, 0, content.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1||1); } this._items[current]&&this.reset(this._items[current].index()); this.invalidate('items'); this.trigger('added', { content: content, position: position }); }; Owl.prototype.remove=function(position){ position=this.normalize(position, true); if(position===undefined){ return; } this.trigger('remove', { content: this._items[position], position: position }); this._items[position].remove(); this._items.splice(position, 1); this._mergers.splice(position, 1); this.invalidate('items'); this.trigger('removed', { content: null, position: position }); }; Owl.prototype.preloadAutoWidthImages=function(images){ images.each($.proxy(function(i, element){ this.enter('pre-loading'); element=$(element); $(new Image()).one('load', $.proxy(function(e){ element.attr('src', e.target.src); element.css('opacity', 1); this.leave('pre-loading'); !this.is('pre-loading')&&!this.is('initializing')&&this.refresh(); }, this)).attr('src', element.attr('src')||element.attr('data-src')||element.attr('data-src-retina')); }, this)); }; Owl.prototype.destroy=function(){ this.$element.off('.owl.core'); this.$stage.off('.owl.core'); $(document).off('.owl.core'); if(this.settings.responsive!==false){ window.clearTimeout(this.resizeTimer); this.off(window, 'resize', this._handlers.onThrottledResize); } for (var i in this._plugins){ this._plugins[i].destroy(); } this.$stage.children('.cloned').remove(); this.$stage.unwrap(); this.$stage.children().contents().unwrap(); this.$stage.children().unwrap(); this.$stage.remove(); this.$element .removeClass(this.options.refreshClass) .removeClass(this.options.loadingClass) .removeClass(this.options.loadedClass) .removeClass(this.options.rtlClass) .removeClass(this.options.dragClass) .removeClass(this.options.grabClass) .attr('class', this.$element.attr('class').replace(new RegExp(this.options.responsiveClass + '-\\S+\\s', 'g'), '')) .removeData('owl.carousel'); }; Owl.prototype.op=function(a, o, b){ var rtl=this.settings.rtl; switch (o){ case '<': return rtl ? a > b:a < b; case '>': return rtl ? a < b:a > b; case '>=': return rtl ? a <=b:a >=b; case '<=': return rtl ? a >=b:a <=b; default: break; }}; Owl.prototype.on=function(element, event, listener, capture){ if(element.addEventListener){ element.addEventListener(event, listener, capture); }else if(element.attachEvent){ element.attachEvent('on' + event, listener); }}; Owl.prototype.off=function(element, event, listener, capture){ if(element.removeEventListener){ element.removeEventListener(event, listener, capture); }else if(element.detachEvent){ element.detachEvent('on' + event, listener); }}; Owl.prototype.trigger=function(name, data, namespace, state, enter){ var status={ item: { count: this._items.length, index: this.current() }}, handler=$.camelCase($.grep([ 'on', name, namespace ], function(v){ return v }) .join('-').toLowerCase() ), event=$.Event([ name, 'owl', namespace||'carousel' ].join('.').toLowerCase(), $.extend({ relatedTarget: this }, status, data) ); if(!this._supress[name]){ $.each(this._plugins, function(name, plugin){ if(plugin.onTrigger){ plugin.onTrigger(event); }}); this.register({ type: Owl.Type.Event, name: name }); this.$element.trigger(event); if(this.settings&&typeof this.settings[handler]==='function'){ this.settings[handler].call(this, event); }} return event; }; Owl.prototype.enter=function(name){ $.each([ name ].concat(this._states.tags[name]||[]), $.proxy(function(i, name){ if(this._states.current[name]===undefined){ this._states.current[name]=0; } this._states.current[name]++; }, this)); }; Owl.prototype.leave=function(name){ $.each([ name ].concat(this._states.tags[name]||[]), $.proxy(function(i, name){ this._states.current[name]--; }, this)); }; Owl.prototype.register=function(object){ if(object.type===Owl.Type.Event){ if(!$.event.special[object.name]){ $.event.special[object.name]={};} if(!$.event.special[object.name].owl){ var _default=$.event.special[object.name]._default; $.event.special[object.name]._default=function(e){ if(_default&&_default.apply&&(!e.namespace||e.namespace.indexOf('owl')===-1)){ return _default.apply(this, arguments); } return e.namespace&&e.namespace.indexOf('owl') > -1; }; $.event.special[object.name].owl=true; }}else if(object.type===Owl.Type.State){ if(!this._states.tags[object.name]){ this._states.tags[object.name]=object.tags; }else{ this._states.tags[object.name]=this._states.tags[object.name].concat(object.tags); } this._states.tags[object.name]=$.grep(this._states.tags[object.name], $.proxy(function(tag, i){ return $.inArray(tag, this._states.tags[object.name])===i; }, this)); }}; Owl.prototype.suppress=function(events){ $.each(events, $.proxy(function(index, event){ this._supress[event]=true; }, this)); }; Owl.prototype.release=function(events){ $.each(events, $.proxy(function(index, event){ delete this._supress[event]; }, this)); }; Owl.prototype.pointer=function(event){ var result={ x: null, y: null }; event=event.originalEvent||event||window.event; event=event.touches&&event.touches.length ? event.touches[0]:event.changedTouches&&event.changedTouches.length ? event.changedTouches[0]:event; if(event.pageX){ result.x=event.pageX; result.y=event.pageY; }else{ result.x=event.clientX; result.y=event.clientY; } return result; }; Owl.prototype.isNumeric=function(number){ return !isNaN(parseFloat(number)); }; Owl.prototype.difference=function(first, second){ return { x: first.x - second.x, y: first.y - second.y };}; $.fn.owlCarousel=function(option){ var args=Array.prototype.slice.call(arguments, 1); return this.each(function(){ var $this=$(this), data=$this.data('owl.carousel'); if(!data){ data=new Owl(this, typeof option=='object'&&option); $this.data('owl.carousel', data); $.each([ 'next', 'prev', 'to', 'destroy', 'refresh', 'replace', 'add', 'remove' ], function(i, event){ data.register({ type: Owl.Type.Event, name: event }); data.$element.on(event + '.owl.carousel.core', $.proxy(function(e){ if(e.namespace&&e.relatedTarget!==this){ this.suppress([ event ]); data[event].apply(this, [].slice.call(arguments, 1)); this.release([ event ]); }}, data)); }); } if(typeof option=='string'&&option.charAt(0)!=='_'){ data[option].apply(data, args); }}); }; $.fn.owlCarousel.Constructor=Owl; })(window.Zepto||window.jQuery, window, document); ;(function($, window, document, undefined){ var AutoRefresh=function(carousel){ this._core=carousel; this._interval=null; this._visible=null; this._handlers={ 'initialized.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._core.settings.autoRefresh){ this.watch(); }}, this) }; this._core.options=$.extend({}, AutoRefresh.Defaults, this._core.options); this._core.$element.on(this._handlers); }; AutoRefresh.Defaults={ autoRefresh: true, autoRefreshInterval: 500 }; AutoRefresh.prototype.watch=function(){ if(this._interval){ return; } this._visible=this._core.isVisible(); this._interval=window.setInterval($.proxy(this.refresh, this), this._core.settings.autoRefreshInterval); }; AutoRefresh.prototype.refresh=function(){ if(this._core.isVisible()===this._visible){ return; } this._visible = !this._visible; this._core.$element.toggleClass('owl-hidden', !this._visible); this._visible&&(this._core.invalidate('width')&&this._core.refresh()); }; AutoRefresh.prototype.destroy=function(){ var handler, property; window.clearInterval(this._interval); for (handler in this._handlers){ this._core.$element.off(handler, this._handlers[handler]); } for (property in Object.getOwnPropertyNames(this)){ typeof this[property]!='function'&&(this[property]=null); }}; $.fn.owlCarousel.Constructor.Plugins.AutoRefresh=AutoRefresh; })(window.Zepto||window.jQuery, window, document); ;(function($, window, document, undefined){ var Lazy=function(carousel){ this._core=carousel; this._loaded=[]; this._handlers={ 'initialized.owl.carousel change.owl.carousel resized.owl.carousel': $.proxy(function(e){ if(!e.namespace){ return; } if(!this._core.settings||!this._core.settings.lazyLoad){ return; } if((e.property&&e.property.name=='position')||e.type=='initialized'){ var settings=this._core.settings, n=(settings.center&&Math.ceil(settings.items / 2)||settings.items), i=((settings.center&&n * -1)||0), position=(e.property&&e.property.value!==undefined ? e.property.value:this._core.current()) + i, clones=this._core.clones().length, load=$.proxy(function(i, v){ this.load(v) }, this); if(settings.lazyLoadEager > 0){ n +=settings.lazyLoadEager; if(settings.loop){ position -=settings.lazyLoadEager; n++; }} while (i++ < n){ this.load(clones / 2 + this._core.relative(position)); clones&&$.each(this._core.clones(this._core.relative(position)), load); position++; }} }, this) }; this._core.options=$.extend({}, Lazy.Defaults, this._core.options); this._core.$element.on(this._handlers); }; Lazy.Defaults={ lazyLoad: false, lazyLoadEager: 0 }; Lazy.prototype.load=function(position){ var $item=this._core.$stage.children().eq(position), $elements=$item&&$item.find('.owl-lazy'); if(!$elements||$.inArray($item.get(0), this._loaded) > -1){ return; } $elements.each($.proxy(function(index, element){ var $element=$(element), image, url=(window.devicePixelRatio > 1&&$element.attr('data-src-retina'))||$element.attr('data-src')||$element.attr('data-srcset'); this._core.trigger('load', { element: $element, url: url }, 'lazy'); if($element.is('img')){ $element.one('load.owl.lazy', $.proxy(function(){ $element.css('opacity', 1); this._core.trigger('loaded', { element: $element, url: url }, 'lazy'); }, this)).attr('src', url); }else if($element.is('source')){ $element.one('load.owl.lazy', $.proxy(function(){ this._core.trigger('loaded', { element: $element, url: url }, 'lazy'); }, this)).attr('srcset', url); }else{ image=new Image(); image.onload=$.proxy(function(){ $element.css({ 'background-image': 'url("' + url + '")', 'opacity': '1' }); this._core.trigger('loaded', { element: $element, url: url }, 'lazy'); }, this); image.src=url; }}, this)); this._loaded.push($item.get(0)); }; Lazy.prototype.destroy=function(){ var handler, property; for (handler in this.handlers){ this._core.$element.off(handler, this.handlers[handler]); } for (property in Object.getOwnPropertyNames(this)){ typeof this[property]!='function'&&(this[property]=null); }}; $.fn.owlCarousel.Constructor.Plugins.Lazy=Lazy; })(window.Zepto||window.jQuery, window, document); ;(function($, window, document, undefined){ var AutoHeight=function(carousel){ this._core=carousel; this._previousHeight=null; this._handlers={ 'initialized.owl.carousel refreshed.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._core.settings.autoHeight){ this.update(); }}, this), 'changed.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._core.settings.autoHeight&&e.property.name==='position'){ this.update(); }}, this), 'loaded.owl.lazy': $.proxy(function(e){ if(e.namespace&&this._core.settings.autoHeight && e.element.closest('.' + this._core.settings.itemClass).index()===this._core.current()){ this.update(); }}, this) }; this._core.options=$.extend({}, AutoHeight.Defaults, this._core.options); this._core.$element.on(this._handlers); this._intervalId=null; var refThis=this; $(window).on('load', function(){ if(refThis._core.settings.autoHeight){ refThis.update(); }}); $(window).resize(function(){ if(refThis._core.settings.autoHeight){ if(refThis._intervalId!=null){ clearTimeout(refThis._intervalId); } refThis._intervalId=setTimeout(function(){ refThis.update(); }, 250); }}); }; AutoHeight.Defaults={ autoHeight: false, autoHeightClass: 'owl-height' }; AutoHeight.prototype.update=function(){ var start=this._core._current, end=start + this._core.settings.items, lazyLoadEnabled=this._core.settings.lazyLoad, visible=this._core.$stage.children().toArray().slice(start, end), heights=[], maxheight=0; $.each(visible, function(index, item){ heights.push($(item).height()); }); maxheight=Math.max.apply(null, heights); if(maxheight <=1&&lazyLoadEnabled&&this._previousHeight){ maxheight=this._previousHeight; } this._previousHeight=maxheight; this._core.$stage.parent() .height(maxheight) .addClass(this._core.settings.autoHeightClass); }; AutoHeight.prototype.destroy=function(){ var handler, property; for (handler in this._handlers){ this._core.$element.off(handler, this._handlers[handler]); } for (property in Object.getOwnPropertyNames(this)){ typeof this[property]!=='function'&&(this[property]=null); }}; $.fn.owlCarousel.Constructor.Plugins.AutoHeight=AutoHeight; })(window.Zepto||window.jQuery, window, document); ;(function($, window, document, undefined){ var Video=function(carousel){ this._core=carousel; this._videos={}; this._playing=null; this._handlers={ 'initialized.owl.carousel': $.proxy(function(e){ if(e.namespace){ this._core.register({ type: 'state', name: 'playing', tags: [ 'interacting' ] }); }}, this), 'resize.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._core.settings.video&&this.isInFullScreen()){ e.preventDefault(); }}, this), 'refreshed.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._core.is('resizing')){ this._core.$stage.find('.cloned .owl-video-frame').remove(); }}, this), 'changed.owl.carousel': $.proxy(function(e){ if(e.namespace&&e.property.name==='position'&&this._playing){ this.stop(); }}, this), 'prepared.owl.carousel': $.proxy(function(e){ if(!e.namespace){ return; } var $element=$(e.content).find('.owl-video'); if($element.length){ $element.css('display', 'none'); this.fetch($element, $(e.content)); }}, this) }; this._core.options=$.extend({}, Video.Defaults, this._core.options); this._core.$element.on(this._handlers); this._core.$element.on('click.owl.video', '.owl-video-play-icon', $.proxy(function(e){ this.play(e); }, this)); }; Video.Defaults={ video: false, videoHeight: false, videoWidth: false }; Video.prototype.fetch=function(target, item){ var type=(function(){ if(target.attr('data-vimeo-id')){ return 'vimeo'; }else if(target.attr('data-vzaar-id')){ return 'vzaar' }else{ return 'youtube'; }})(), id=target.attr('data-vimeo-id')||target.attr('data-youtube-id')||target.attr('data-vzaar-id'), width=target.attr('data-width')||this._core.settings.videoWidth, height=target.attr('data-height')||this._core.settings.videoHeight, url=target.attr('href'); if(url){ id=url.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/); if(id[3].indexOf('youtu') > -1){ type='youtube'; }else if(id[3].indexOf('vimeo') > -1){ type='vimeo'; }else if(id[3].indexOf('vzaar') > -1){ type='vzaar'; }else{ throw new Error('Video URL not supported.'); } id=id[6]; }else{ throw new Error('Missing video URL.'); } this._videos[url]={ type: type, id: id, width: width, height: height }; item.attr('data-video', url); this.thumbnail(target, this._videos[url]); }; Video.prototype.thumbnail=function(target, video){ var tnLink, icon, path, dimensions=video.width&&video.height ? 'width:' + video.width + 'px;height:' + video.height + 'px;':'', customTn=target.find('img'), srcType='src', lazyClass='', settings=this._core.settings, create=function(path){ icon='
    '; if(settings.lazyLoad){ tnLink=$('
    ',{ "class": 'owl-video-tn ' + lazyClass, "srcType": path }); }else{ tnLink=$('
    ', { "class": "owl-video-tn", "style": 'opacity:1;background-image:url(' + path + ')' }); } target.after(tnLink); target.after(icon); }; target.wrap($('
    ', { "class": "owl-video-wrapper", "style": dimensions })); if(this._core.settings.lazyLoad){ srcType='data-src'; lazyClass='owl-lazy'; } if(customTn.length){ create(customTn.attr(srcType)); customTn.remove(); return false; } if(video.type==='youtube'){ path="//img.youtube.com/vi/" + video.id + "/hqdefault.jpg"; create(path); }else if(video.type==='vimeo'){ $.ajax({ type: 'GET', url: '//vimeo.com/api/v2/video/' + video.id + '.json', jsonp: 'callback', dataType: 'jsonp', success: function(data){ path=data[0].thumbnail_large; create(path); }}); }else if(video.type==='vzaar'){ $.ajax({ type: 'GET', url: '//vzaar.com/api/videos/' + video.id + '.json', jsonp: 'callback', dataType: 'jsonp', success: function(data){ path=data.framegrab_url; create(path); }}); }}; Video.prototype.stop=function(){ this._core.trigger('stop', null, 'video'); this._playing.find('.owl-video-frame').remove(); this._playing.removeClass('owl-video-playing'); this._playing=null; this._core.leave('playing'); this._core.trigger('stopped', null, 'video'); }; Video.prototype.play=function(event){ var target=$(event.target), item=target.closest('.' + this._core.settings.itemClass), video=this._videos[item.attr('data-video')], width=video.width||'100%', height=video.height||this._core.$stage.height(), html, iframe; if(this._playing){ return; } this._core.enter('playing'); this._core.trigger('play', null, 'video'); item=this._core.items(this._core.relative(item.index())); this._core.reset(item.index()); html=$(''); html.attr('height', height); html.attr('width', width); if(video.type==='youtube'){ html.attr('src', '//www.youtube.com/embed/' + video.id + '?autoplay=1&rel=0&v=' + video.id); }else if(video.type==='vimeo'){ html.attr('src', '//player.vimeo.com/video/' + video.id + '?autoplay=1'); }else if(video.type==='vzaar'){ html.attr('src', '//view.vzaar.com/' + video.id + '/player?autoplay=true'); } iframe=$(html).wrap('
    ').insertAfter(item.find('.owl-video')); this._playing=item.addClass('owl-video-playing'); }; Video.prototype.isInFullScreen=function(){ var element=document.fullscreenElement||document.mozFullScreenElement || document.webkitFullscreenElement; return element&&$(element).parent().hasClass('owl-video-frame'); }; Video.prototype.destroy=function(){ var handler, property; this._core.$element.off('click.owl.video'); for (handler in this._handlers){ this._core.$element.off(handler, this._handlers[handler]); } for (property in Object.getOwnPropertyNames(this)){ typeof this[property]!='function'&&(this[property]=null); }}; $.fn.owlCarousel.Constructor.Plugins.Video=Video; })(window.Zepto||window.jQuery, window, document); ;(function($, window, document, undefined){ var Animate=function(scope){ this.core=scope; this.core.options=$.extend({}, Animate.Defaults, this.core.options); this.swapping=true; this.previous=undefined; this.next=undefined; this.handlers={ 'change.owl.carousel': $.proxy(function(e){ if(e.namespace&&e.property.name=='position'){ this.previous=this.core.current(); this.next=e.property.value; }}, this), 'drag.owl.carousel dragged.owl.carousel translated.owl.carousel': $.proxy(function(e){ if(e.namespace){ this.swapping=e.type=='translated'; }}, this), 'translate.owl.carousel': $.proxy(function(e){ if(e.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)){ this.swap(); }}, this) }; this.core.$element.on(this.handlers); }; Animate.Defaults={ animateOut: false, animateIn: false }; Animate.prototype.swap=function(){ if(this.core.settings.items!==1){ return; } if(!$.support.animation||!$.support.transition){ return; } this.core.speed(0); var left, clear=$.proxy(this.clear, this), previous=this.core.$stage.children().eq(this.previous), next=this.core.$stage.children().eq(this.next), incoming=this.core.settings.animateIn, outgoing=this.core.settings.animateOut; if(this.core.current()===this.previous){ return; } if(outgoing){ left=this.core.coordinates(this.previous) - this.core.coordinates(this.next); previous.one($.support.animation.end, clear) .css({ 'left': left + 'px' }) .addClass('animated owl-animated-out') .addClass(outgoing); } if(incoming){ next.one($.support.animation.end, clear) .addClass('animated owl-animated-in') .addClass(incoming); }}; Animate.prototype.clear=function(e){ $(e.target).css({ 'left': '' }) .removeClass('animated owl-animated-out owl-animated-in') .removeClass(this.core.settings.animateIn) .removeClass(this.core.settings.animateOut); this.core.onTransitionEnd(); }; Animate.prototype.destroy=function(){ var handler, property; for (handler in this.handlers){ this.core.$element.off(handler, this.handlers[handler]); } for (property in Object.getOwnPropertyNames(this)){ typeof this[property]!='function'&&(this[property]=null); }}; $.fn.owlCarousel.Constructor.Plugins.Animate=Animate; })(window.Zepto||window.jQuery, window, document); ;(function($, window, document, undefined){ var Autoplay=function(carousel){ this._core=carousel; this._call=null; this._time=0; this._timeout=0; this._paused=true; this._handlers={ 'changed.owl.carousel': $.proxy(function(e){ if(e.namespace&&e.property.name==='settings'){ if(this._core.settings.autoplay){ this.play(); }else{ this.stop(); }}else if(e.namespace&&e.property.name==='position'&&this._paused){ this._time=0; }}, this), 'initialized.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._core.settings.autoplay){ this.play(); }}, this), 'play.owl.autoplay': $.proxy(function(e, t, s){ if(e.namespace){ this.play(t, s); }}, this), 'stop.owl.autoplay': $.proxy(function(e){ if(e.namespace){ this.stop(); }}, this), 'mouseover.owl.autoplay': $.proxy(function(){ if(this._core.settings.autoplayHoverPause&&this._core.is('rotating')){ this.pause(); }}, this), 'mouseleave.owl.autoplay': $.proxy(function(){ if(this._core.settings.autoplayHoverPause&&this._core.is('rotating')){ this.play(); }}, this), 'touchstart.owl.core': $.proxy(function(){ if(this._core.settings.autoplayHoverPause&&this._core.is('rotating')){ this.pause(); }}, this), 'touchend.owl.core': $.proxy(function(){ if(this._core.settings.autoplayHoverPause){ this.play(); }}, this) }; this._core.$element.on(this._handlers); this._core.options=$.extend({}, Autoplay.Defaults, this._core.options); }; Autoplay.Defaults={ autoplay: false, autoplayTimeout: 5000, autoplayHoverPause: false, autoplaySpeed: false }; Autoplay.prototype._next=function(speed){ this._call=window.setTimeout($.proxy(this._next, this, speed), this._timeout * (Math.round(this.read() / this._timeout) + 1) - this.read() ); if(this._core.is('interacting')||document.hidden){ return; } this._core.next(speed||this._core.settings.autoplaySpeed); } Autoplay.prototype.read=function(){ return new Date().getTime() - this._time; }; Autoplay.prototype.play=function(timeout, speed){ var elapsed; if(!this._core.is('rotating')){ this._core.enter('rotating'); } timeout=timeout||this._core.settings.autoplayTimeout; elapsed=Math.min(this._time % (this._timeout||timeout), timeout); if(this._paused){ this._time=this.read(); this._paused=false; }else{ window.clearTimeout(this._call); } this._time +=this.read() % timeout - elapsed; this._timeout=timeout; this._call=window.setTimeout($.proxy(this._next, this, speed), timeout - elapsed); }; Autoplay.prototype.stop=function(){ if(this._core.is('rotating')){ this._time=0; this._paused=true; window.clearTimeout(this._call); this._core.leave('rotating'); }}; Autoplay.prototype.pause=function(){ if(this._core.is('rotating')&&!this._paused){ this._time=this.read(); this._paused=true; window.clearTimeout(this._call); }}; Autoplay.prototype.destroy=function(){ var handler, property; this.stop(); for (handler in this._handlers){ this._core.$element.off(handler, this._handlers[handler]); } for (property in Object.getOwnPropertyNames(this)){ typeof this[property]!='function'&&(this[property]=null); }}; $.fn.owlCarousel.Constructor.Plugins.autoplay=Autoplay; })(window.Zepto||window.jQuery, window, document); ;(function($, window, document, undefined){ 'use strict'; var Navigation=function(carousel){ this._core=carousel; this._initialized=false; this._pages=[]; this._controls={}; this._templates=[]; this.$element=this._core.$element; this._overrides={ next: this._core.next, prev: this._core.prev, to: this._core.to }; this._handlers={ 'prepared.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._core.settings.dotsData){ this._templates.push('
    ' + $(e.content).find('[data-dot]').addBack('[data-dot]').attr('data-dot') + '
    '); }}, this), 'added.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._core.settings.dotsData){ this._templates.splice(e.position, 0, this._templates.pop()); }}, this), 'remove.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._core.settings.dotsData){ this._templates.splice(e.position, 1); }}, this), 'changed.owl.carousel': $.proxy(function(e){ if(e.namespace&&e.property.name=='position'){ this.draw(); }}, this), 'initialized.owl.carousel': $.proxy(function(e){ if(e.namespace&&!this._initialized){ this._core.trigger('initialize', null, 'navigation'); this.initialize(); this.update(); this.draw(); this._initialized=true; this._core.trigger('initialized', null, 'navigation'); }}, this), 'refreshed.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._initialized){ this._core.trigger('refresh', null, 'navigation'); this.update(); this.draw(); this._core.trigger('refreshed', null, 'navigation'); }}, this) }; this._core.options=$.extend({}, Navigation.Defaults, this._core.options); this.$element.on(this._handlers); }; Navigation.Defaults={ nav: false, navText: [ '', '' ], navSpeed: false, navElement: 'button type="button" role="presentation"', navContainer: false, navContainerClass: 'owl-nav', navClass: [ 'owl-prev', 'owl-next' ], slideBy: 1, dotClass: 'owl-dot', dotsClass: 'owl-dots', dots: true, dotsEach: false, dotsData: false, dotsSpeed: false, dotsContainer: false }; Navigation.prototype.initialize=function(){ var override, settings=this._core.settings; this._controls.$relative=(settings.navContainer ? $(settings.navContainer) : $('
    ').addClass(settings.navContainerClass).appendTo(this.$element)).addClass('disabled'); this._controls.$previous=$('<' + settings.navElement + '>') .addClass(settings.navClass[0]) .html(settings.navText[0]) .prependTo(this._controls.$relative) .on('click', $.proxy(function(e){ this.prev(settings.navSpeed); }, this)); this._controls.$next=$('<' + settings.navElement + '>') .addClass(settings.navClass[1]) .html(settings.navText[1]) .appendTo(this._controls.$relative) .on('click', $.proxy(function(e){ this.next(settings.navSpeed); }, this)); if(!settings.dotsData){ this._templates=[ $('
    '),(s=R("#multiscroll-nav")).css("color",v.navigationColor),s.addClass(v.navigationPosition)),R(".ms-right, .ms-left").css({width:"50%",position:"absolute",height:"100%","-ms-touch-action":"none"}),R(".ms-right").css({right:"1px",top:"0","-ms-touch-action":"none","touch-action":"none"}),R(".ms-left").css({left:"0",top:"0","-ms-touch-action":"none","touch-action":"none"}),R(".ms-left .ms-section, .ms-right .ms-section").each(function(){var e,t=R(this).index();if((v.paddingTop||v.paddingBottom)&&R(this).css("padding",v.paddingTop+" 0 "+v.paddingBottom+" 0"),void 0!==v.sectionsColor[t]&&R(this).css("background-color",v.sectionsColor[t]),void 0!==v.anchors[t]&&R(this).attr("data-anchor",v.anchors[t]),v.verticalCentered&&(e=R(this)).addClass("ms-table").wrapInner('
    '),R(this).closest(".ms-left").length&&v.navigation){var n="";v.anchors.length&&(n=v.anchors[t]);var o=v.navigationTooltips[t];void 0===o&&(o=""),v.navigation&&s.find("ul").append('
  • ')}}),R(".ms-right").html(R(".ms-right").find(".ms-section").get().reverse()),R(".ms-left .ms-section, .ms-right .ms-section").each(function(){var e=R(this).index();R(this).css({height:"100%"}),!e&&v.navigation&&s.find("li").eq(e).find("a").addClass("active")}).promise().done(function(){R(".ms-left .ms-section.active").length||(R(".ms-right").find(".ms-section").last().addClass("active"),R(".ms-left").find(".ms-section").first().addClass("active")),v.navigation&&s.css("margin-top","-"+s.height()/2+"px"),R.isFunction(v.afterRender)&&v.afterRender.call(this),x(),T(),R(F).on("load",function(){var e,t;e=F.location.hash.replace("#",""),t=R('.ms-left .ms-section[data-anchor="'+e+'"]'),e.length&&b(t)})}),R(F).on("hashchange",c),R(Y).keydown(function(e){clearTimeout(l);var t=R(Y.activeElement);if(!t.is("textarea")&&!t.is("input")&&!t.is("select")&&v.keyboardScrolling){var n=e.which;-120*I.max(p,t)/100&&(S(!0),p=t)}}else clearTimeout(a),a=setTimeout(function(){S(!0)},350)});var p=r;function S(e){r=R(F).height(),R(".ms-tableCell").each(function(){R(this).css({height:E(R(this).parent())})}),v.scrollOverflow&&scrollBarHandler.createScrollBarForAll(),x(),R.isFunction(v.afterResize)&&v.afterResize.call(this)}function x(){v.css3?(C(R(".ms-left"),"translate3d(0px, -"+R(".ms-left").find(".ms-section.active").position().top+"px, 0px)",!1),C(R(".ms-right"),"translate3d(0px, -"+R(".ms-right").find(".ms-section.active").position().top+"px, 0px)",!1)):(R(".ms-left").css("top",-R(".ms-left").find(".ms-section.active").position().top),R(".ms-right").css("top",-R(".ms-right").find(".ms-section.active").position().top))}function b(e){var t=e.index(),n=R(".ms-right").find(".ms-section").eq(u-1-t),o=e.data("anchor"),i=R(".ms-left .ms-section.active").index()+1,s=function(e){var t=R(".ms-left .ms-section.active").index(),n=e.index();if(nR(F).height()/100*v.touchSensitivity&&(Lb&&(b+=1);1b?c:b<2/3?a+(c-a)*(2/3-b)*6:a}var d=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(a)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(a);a=parseInt(d[1])/360;var b=parseInt(d[2])/100,f=parseInt(d[3])/100,d=d[4]||1;if(0==b)f=b=a=f;else{var n=.5>f?f*(1+b):f+b-f*b,k=2*f-n,f=c(k,n,a+1/3),b=c(k,n,a);a=c(k,n,a-1/3)}return"rgba("+ 255*f+","+255*b+","+255*a+","+d+")"}function y(a){if(a=/([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(a))return a[2]}function V(a){if(-1=g.currentTime)for(var G=0;G=w||!k)g.began||(g.began=!0,f("begin")),f("run");if(q>n&&q=k&&r!==k||!k)b(k),x||e();f("update");a>=k&&(g.remaining?(t=h,"alternate"===g.direction&&(g.reversed=!g.reversed)):(g.pause(),g.completed||(g.completed=!0,f("complete"),"Promise"in window&&(p(),m=c()))),l=0)}a=void 0===a?{}:a;var h,t,l=0,p=null,m=c(),g=fa(a);g.reset=function(){var a=g.direction,c=g.loop;g.currentTime= 0;g.progress=0;g.paused=!0;g.began=!1;g.completed=!1;g.reversed="reverse"===a;g.remaining="alternate"===a&&1===c?2:c;b(0);for(a=g.children.length;a--;)g.children[a].reset()};g.tick=function(a){h=a;t||(t=h);k((l+h-t)*q.speed)};g.seek=function(a){k(d(a))};g.pause=function(){var a=v.indexOf(g);-1=c&&0<=b&&1>=b){var e=new Float32Array(11);if(c!==d||b!==f)for(var k=0;11>k;++k)e[k]=a(.1*k,c,b);return function(k){if(c===d&&b===f)return k;if(0===k)return 0;if(1===k)return 1;for(var h=0,l=1;10!==l&&e[l]<=k;++l)h+=.1;--l;var l=h+(k-e[l])/(e[l+1]-e[l])*.1,n=3*(1-3*b+3*c)*l*l+2*(3*b-6*c)*l+3*c;if(.001<=n){for(h=0;4>h;++h){n=3*(1-3*b+3*c)*l*l+2*(3*b-6*c)*l+3*c;if(0===n)break;var m=a(l,c,b)-k,l=l-m/n}k=l}else if(0===n)k=l;else{var l=h,h=h+.1,g=0;do m=l+(h-l)/2,n=a(m,c,b)-k,0++g);k=m}return a(k,d,f)}}}}(),Q=function(){function a(a,b){return 0===a||1===a?a:-Math.pow(2,10*(a-1))*Math.sin(2*(a-1-b/(2*Math.PI)*Math.asin(1))*Math.PI/b)}var c="Quad Cubic Quart Quint Sine Expo Circ Back Elastic".split(" "),d={In:[[.55,.085,.68,.53],[.55,.055,.675,.19],[.895,.03,.685,.22],[.755,.05,.855,.06],[.47,0,.745,.715],[.95,.05,.795,.035],[.6,.04,.98,.335],[.6,-.28,.735,.045],a],Out:[[.25, .46,.45,.94],[.215,.61,.355,1],[.165,.84,.44,1],[.23,1,.32,1],[.39,.575,.565,1],[.19,1,.22,1],[.075,.82,.165,1],[.175,.885,.32,1.275],function(b,c){return 1-a(1-b,c)}],InOut:[[.455,.03,.515,.955],[.645,.045,.355,1],[.77,0,.175,1],[.86,0,.07,1],[.445,.05,.55,.95],[1,0,0,1],[.785,.135,.15,.86],[.68,-.55,.265,1.55],function(b,c){return.5>b?a(2*b,c)/2:1-a(-2*b+2,c)/2}]},b={linear:A(.25,.25,.75,.75)},f={},e;for(e in d)f.type=e,d[f.type].forEach(function(a){return function(d,f){b["ease"+a.type+c[f]]=h.fnc(d)? d:A.apply($jscomp$this,d)}}(f)),f={type:f.type};return b}(),ha={css:function(a,c,d){return a.style[c]=d},attribute:function(a,c,d){return a.setAttribute(c,d)},object:function(a,c,d){return a[c]=d},transform:function(a,c,d,b,f){b[f]||(b[f]=[]);b[f].push(c+"("+d+")")}},v=[],B=0,ia=function(){function a(){B=requestAnimationFrame(c)}function c(c){var b=v.length;if(b){for(var d=0;db&&(c.duration=d.duration);c.children.push(d)});c.seek(0);c.reset();c.autoplay&&c.restart();return c};return c};q.random=function(a,c){return Math.floor(Math.random()*(c-a+1))+a};return q}); var j$=jQuery; j$.noConflict(); "use strict"; j$(document).ready(function(){ zt_elements_animation(); zt_vc_column_equal_heights(); zt_progress_bar(); apress_spacer(); if(j$('#apress_fullscreen_rows').length > 0&&j$(window).width() > 1000){ zt_full_screen_rows(); }else{ j$('#apress_fullscreen_rows').css('opacity', 1); } apcore_verticalSplitSliderInit(); apcore_animated_svg(); apcore_slick_slider(); apcore_imagebox_auto_height(); apcore_testimonial_carousel(); }); j$(window).on('load',function (){ apcore_blogpostslider3(); apcore_owl_slider(); apcore_posttype_equal_heights(); apcore_particles_custom(); apcore_photo_gallery_justified(); apcore_photo_gallery_masonry_grid(); apcore_morphing_img(); apcore_video_lightbox(); }); function apcore_blogpostslider3(){ if(j$("body").hasClass("rtl")){ var rtlvar=true }else{ var rtlvar=false } j$(".postsliderstyle3").owlCarousel({ stagePadding:200, autoplay:true, items:1, loop:true, rtl:rtlvar, margin:8, nav:true, navText:["",""], responsive:{ 0:{items:1,stagePadding:0,}, 500:{items:1,stagePadding:0,}, 800:{items:1,stagePadding:0,}, 1300:{items:1,stagePadding:300,}} }); }; function apcore_owl_slider(){ if(j$("body").hasClass("rtl")){ var rtlvar=true }else{ var rtlvar=false } j$('body').find('.zolo_owl_slider').each(function (){ var _this=j$(this); var stagePadding=parseInt(_this.data('stage-padding')); stagePadding=stagePadding > 0 ? stagePadding:0; _this.owlCarousel({ margin: _this.data('margin'), slideBy: _this.data('slide-by'), loop: _this.data('loop'), lazyLoad: _this.data('lazy-load'), stagePadding: stagePadding, autoHeight:_this.data('auto-height'), autoWidth: _this.data('auto-width'), center: _this.data('center'), nav: _this.data('nav'), dots: _this.data('dots'), navContainer: 0, dotsContainer: 0, autoplay: _this.data('autoplay'), autoplayTimeout: _this.data('autoplay-timeout'), autoplaySpeed: _this.data('autoplay-speed'), autoplayHoverPause: _this.data('autoplay-hover-pause'), animateOut: _this.data('animate-out'), animateIn: _this.data('animate-in'), rtl:rtlvar, navText: ["",""], responsive: { 0: {items: _this.data('colums-mobile')}, 800: {items: _this.data('colums-tablet')}, 1050: {items: _this.data('colums-desktop')}, }}); }); } function apcore_testimonial_carousel(){ j$('body').find('.feedback-slider').each(function (){ var feedbackSlider=j$(this); feedbackSlider.owlCarousel({ items: 1, nav: true, dots: false, autoplay: feedbackSlider.data('autoplay'), autoHeight:true, loop: feedbackSlider.data('loop'), mouseDrag: true, touchDrag: true, navText: ["", ""], responsive:{ 767:{ nav: true, dots: false }} }); feedbackSlider.on("translate.owl.carousel", function(){ j$(".zolo_testimonial_carousel_box img, .feedback-slider-thumb img, .customer-rating").removeClass("animated zoomIn").css("opacity", "0"); }); feedbackSlider.on("translated.owl.carousel", function(){ j$(".zolo_testimonial_carousel_box img, .feedback-slider-thumb img, .customer-rating").addClass("animated zoomIn").css("opacity", "1"); }); feedbackSlider.on('changed.owl.carousel', function(property){ var current=property.item.index; var prevThumb=j$(property.target).find(".owl-item").eq(current).prev().find("img").attr('src'); var nextThumb=j$(property.target).find(".owl-item").eq(current).next().find("img").attr('src'); j$('.thumb-prev').find('img').attr('src', prevThumb); j$('.thumb-next').find('img').attr('src', nextThumb); }); j$('.thumb-next').on('click', function(){ feedbackSlider.trigger('next.owl.carousel', [300]); return false; }); j$('.thumb-prev').on('click', function(){ feedbackSlider.trigger('prev.owl.carousel', [300]); return false; }); }); } function zt_elements_animation(){ j$('.animated').appear(function(){ var element=j$(this); var animation=element.data('animation'); var animationDelay=element.data('delay'); if(animationDelay){ setTimeout(function(){ element.addClass(animation + " visible"); element.removeClass('hiding'); if(element.hasClass('counter')){ element.children('.value').countTo(); }}, animationDelay); }else{ element.addClass(animation + " visible"); element.removeClass('hiding'); if(element.hasClass('counter')){ element.children('.value').countTo(); }} }, { accY: -150 }); var $element=j$('.apcore-clipping-animation'), wrapper='
    '; $element.wrapInner(wrapper); $element.each(function(){ var $that=j$(this), $wrapper=$that.find('.apcore-clipping-wrapper'), overlay='
    '; j$(overlay).appendTo($wrapper); }); $element.appear(function(){ var $that=j$(this), animation=$that.attr('data-animation'), animationDelay=$that.attr('data-delay'); if(animationDelay){ setTimeout(function (){ $that.addClass(animation + " visible"); $that.removeClass('clipping-hide'); setTimeout(function(){ $that.addClass('apcore-clipping-show-content'); },700) setTimeout(function(){ $that.removeClass('apcore-clipping-animation'); },1400) }, animationDelay); }else{ $that.addClass(animation + " visible"); $that.removeClass('clipping-hide'); setTimeout(function(){ $that.addClass('apcore-clipping-show-content'); },500) }}, { accY: -150 }); } function zt_vc_column_equal_heights(){ j$('.vc_row-fluid').each(function(){ var highestBox=0; j$('.equal_height', this).each(function(){ if(j$(this).height() > highestBox) highestBox=j$(this).height(); }); j$('.equal_height', this).height(highestBox); }); } function zt_progress_bar(){ j$(".z_pb_holder").appear(function(){ j$(this).find(".progress_bar_sc").each(function (index){ var j$this=j$(this), bar=j$this.find(".pb_bg"), bar_stripe=j$this.find(".pb_stripe"), val=bar.data("percentage-value"); setTimeout(function (){ bar.css({"width": val + "%"}); bar_stripe.css({"width": val + "%"}); }, index * 200); }); }); } function apress_spacer(){ var css=''; j$('.apress-spacer').each(function(i,spacer){ var uid=j$(spacer).data('id'); var body_width=j$("body").width(); var height_on_mob=j$(spacer).data('height-mobile'); var height_on_mob_landscape=j$(spacer).data('height-mobile-landscape'); var height_on_tabs=j$(spacer).data('height-tab'); var height_on_tabs_portrait=j$(spacer).data('height-tab-portrait'); var height=j$(spacer).data('height'); if(height!=''){ css +=' .spacer-'+uid+' { height:'+height+'px } '; } if(height_on_tabs!=''||height_on_tabs=='0'||height_on_tabs==0){ css +=' @media (max-width: 1199px){ .spacer-'+uid+' { height:'+height_on_tabs+'px }} '; } if(typeof height_on_tabs_portrait!='undefined'&&(height_on_tabs_portrait!=''||height_on_tabs_portrait=='0'||height_on_tabs_portrait==0)){ css +=' @media (max-width: 991px){ .spacer-'+uid+' { height:'+height_on_tabs_portrait+'px }} '; } if(typeof height_on_mob_landscape!='undefined'&&(height_on_mob_landscape!=''||height_on_mob_landscape=='0'||height_on_mob_landscape==0)){ css +=' @media (max-width: 767px){ .spacer-'+uid+' { height:'+height_on_mob_landscape+'px }} '; } if(height_on_mob!=''||height_on_mob=='0'||height_on_mob==0){ css +=' @media (max-width: 479px){ .spacer-'+uid+' { height:'+height_on_mob+'px }} '; }}); if(css!=''){ css=''; j$('head').append(css); }} var fullpage_animation=j$('#apress_fullscreen_rows').data('fullpage-animation'); var $anchors=[]; var $names=[]; var $navigation; function setFPNames(){ $anchors=[]; $names=[]; j$('#apress_fullscreen_rows > .wpb_row').each(function(i){ $id=(j$(this).is('[data-fullscreen-anchor-id]')) ? j$(this).attr('data-fullscreen-anchor-id'):''; if(j$('#apress_fullscreen_rows[data-anchors="on"]').length > 0){ $anchors.push($id); } $tooltip=(j$(this).is('[data-tooltip-name]')) ? j$(this).attr('data-tooltip-name'):''; if(j$('#apress_fullscreen_rows[data-dotnavigation="tooltip"]').length > 0||j$('#apress_fullscreen_rows[data-dotnavigation="tooltip_alt"]').length > 0){ if($tooltip.indexOf('fp_')==-1) $names.push($tooltip); else $names.push(); } if(j$('#apress_fullscreen_rows[data-dotnavigation="hidden"]').length > 0){ $navigation=false; }else{ $navigation=true; }}); } setFPNames(); function zt_full_screen_rows(){ j$('#apress_fullscreen_rows').fullpage({ sectionSelector: '.zolo_wpb_row', navigation: $navigation, css3: true, anchors: $anchors, scrollOverflow: true, navigationPosition: 'right', navigationTooltips: $names, afterLoad: function(anchorLink, index, slideAnchor, slideIndex){ var pageNavs=j$('.zolo-header-area, body'); var rowBrightness=j$(this).data('row-text-color'); pageNavs.removeClass('header_show_with_dark_row header_show_with_light_row fp-moving fp-moving-down').addClass('header_show_with_' + rowBrightness + '_row'); if(fullpage_animation=='zoom_out'){ j$('#apress_fullscreen_rows > .wpb_row:not(.active)').css({'transform':'translateY(0)','left':'-9999px', 'transition': 'none', 'opacity':'1', 'will-change':'auto'}); j$('#apress_fullscreen_rows > .wpb_row').css({'transition': 'none', 'transform':'none', 'will-change':'auto'}); }}, onLeave: function(index, nextIndex, direction){ if(fullpage_animation=='zoom_out'){ var $row_id=j$('#apress_fullscreen_rows > .wpb_row:nth-child('+nextIndex+')').attr('id'); var $indexRow=j$('#apress_fullscreen_rows > .wpb_row:nth-child('+index+')'); var $nextIndexRow=j$('#apress_fullscreen_rows > .wpb_row:nth-child('+nextIndex+')'); var pageNavs=j$('.main-header, body'),nextRowBrightness=$nextIndexRow.data('row-text-color'); var $fpAnimationSpeed; $fpAnimationSpeed=1050; if(direction=='down'){ pageNavs.removeClass('header_show_with_dark_row header_show_with_light_row').addClass('fp-moving-down header_show_with_' + nextRowBrightness + '_row'); $indexRow.css({'transition': 'opacity '+$fpAnimationSpeed+'ms cubic-bezier(0.37, 0.91, 0.90, 0.85), transform '+$fpAnimationSpeed+'ms cubic-bezier(0.37, 0.91, 0.90, 0.85)', 'z-index': '100', 'will-change':'transform'}); setTimeout(function(){ $indexRow.css({'transform': 'scale(0.62) translateZ(0)', 'opacity': '0'}); }, 60); $nextIndexRow.css({'z-index':'1000','top':'0','left':'0'}); }else{ pageNavs.removeClass('header_show_with_dark_row header_show_with_light_row').addClass('header_show_with_' + nextRowBrightness + '_row'); $indexRow.css({'transition': 'opacity '+$fpAnimationSpeed+'ms cubic-bezier(0.37, 0.91, 0.90, 0.85), transform '+$fpAnimationSpeed+'ms cubic-bezier(0.37, 0.91, 0.90, 0.85)', 'z-index': '100', 'will-change':'transform'}); setTimeout(function(){ $indexRow.css({'transform': 'scale(0.62) translateZ(0)', 'opacity': '0'}); }, 60); $nextIndexRow.css({'z-index':'1000','top':'0','left':'0'}); }} }, }); j$('#apress_fullscreen_rows').css('opacity', 1); } function apcore_verticalSplitSliderInit(){ if(j$('.vertical_split_slider').length){ j$(".zolo_footer_area").remove(); j$(".pagetitle_parallax_section").remove(); var $vertical_tt_names=[]; var $tooltips=[]; j$('.ms-left .ms_tool_tips').each(function(i){ var $tooltips=j$(this).data("tool-tip"); $vertical_tt_names.push($tooltips); }); j$('.vertical_split_slider').multiscroll({ scrollingSpeed: 500, navigation: true, navigationTooltips: $vertical_tt_names, afterLoad: function(anchorLink, index){ if(j$('.vertical_split_slider').find('.ms-section.active').hasClass('dark')){ j$('.zolo-header-area').removeClass('apress_splitpage_header_light').addClass('apress_splitpage_header_dark'); j$('body').removeClass('apress_splitpage_light').addClass('apress_splitpage_dark'); }else{ j$('.zolo-header-area').removeClass('apress_splitpage_header_dark').addClass('apress_splitpage_header_light'); j$('body').removeClass('apress_splitpage_dark').addClass('apress_splitpage_light'); }}, afterRender: function(){ if(j$('.vertical_split_slider').find('.ms-section.active').hasClass('dark')){ j$('.zolo-header-area').removeClass('apress_splitpage_header_light').addClass('apress_splitpage_header_dark'); j$('body').removeClass('apress_splitpage_light').addClass('apress_splitpage_dark'); }else{ j$('.zolo-header-area').removeClass('apress_splitpage_header_dark').addClass('apress_splitpage_header_light'); j$('body').removeClass('apress_splitpage_dark').addClass('apress_splitpage_light'); }}, afterResize: function(){}, onLeave: function(index, nextIndex, direction){}, }); j$('html').addClass('apress_split_slider_enable'); }} function apcore_posttype_equal_heights(){ j$('.zolo_custom_posttype_style2').each(function(){ var highestBox3=0; j$('.zolo_posttype_title_des', this).each(function(){ if(j$(this).height() > highestBox3) highestBox3=j$(this).height(); }); j$('.zolo_posttype_title_des', this).height(highestBox3); }); } function apcore_animated_svg(){ var $svg=j$('.zolo_gradient_svg_icon'); $svg.each(function(){ var $icon=j$(this), duration=$icon.data('duration'), id=$icon.attr('id'), file=$icon.data('file'), color=$icon.data('color'), myVivus; myVivus=new Vivus(id, { duration:duration, file:file, type: 'async', start:'inViewport', onReady: function (event){ var strokegradients, strokeHoverGradients=document.createElementNS('http://www.w3.org/2000/svg', 'style'), linearGradientEl=document.createElementNS('http://www.w3.org/2000/svg', 'linearGradient'), gradientValues=typeof color!==typeof undefined&&color!==null ? color.split(','):'#000', gid=Math.round(Math.random() * 1e6); if(undefined===gradientValues[1]){ gradientValues[1]=gradientValues[0]; } strokegradients='' + '' + '' + ""; var xmlStrokegradients=new DOMParser().parseFromString(strokegradients, "text/xml"); $icon.children('svg').prepend(xmlStrokegradients.documentElement); $icon.children('svg').find('path').attr('stroke', 'url(#grad' + gid + ')'); }}); }); } function apcore_slick_slider(){ if(j$("body").hasClass("rtl")){ var rtlvar=true }else{ var rtlvar=false } j$('body').find('.zolo_slick_slider').each(function (){ var _this=j$(this); if(j$("body").hasClass("rtl")){ var rtlvar=true }else{ var rtlvar=false } _this.find('.zolo_slick_slider_holder').slick({ dots: _this.data('dots'), infinite: _this.data('infinite'), speed: _this.data('speed'), rtl:rtlvar, autoplay: _this.data('autoplay'), autoplaySpeed:_this.data('autoplay-speed'), arrows: _this.data('arrows'), focusOnSelect:_this.data('focusonselect'), fade:_this.data('fade'), centerMode:_this.data('center-mode'), lazyLoad:_this.data('lazy-load'), centerPadding:_this.data('desktop-center-padding'), variableWidth: _this.data('variable-width'), slidesToShow:_this.data('desktop-show'), slidesToScroll: 1, responsive: [ { breakpoint: 1050, settings: { slidesToShow:_this.data('small-desktop-show'), slidesToScroll: 1, centerPadding:_this.data('small-desktop-padding'), }}, { breakpoint: 800, settings: { slidesToShow:_this.data('tablet-show'), slidesToScroll: 1, centerPadding:_this.data('tablet-padding'), }}, ] }); if(_this.data('mouse-wheel')=='yes'){ _this.find('.zolo_slick_slider_holder').on("wheel", (function(e){ e.preventDefault(); if(e.originalEvent.deltaY < 0){ j$(this).slick("slickPrev"); }else{ j$(this).slick("slickNext"); }})); }}); } function apcore_particles_custom (){ jQuery('.particles-js').each(function (){ var id=jQuery(this).attr('id'); var type=jQuery(this).data('particles-type'); var color_type=jQuery(this).data('particles-colors-type'); var color=jQuery(this).data('particles-color'); var color_line=jQuery(this).data('particles-color'); var number=jQuery(this).data('particles-number'); var lines=jQuery(this).data('particles-line'); var size=jQuery(this).data('particles-size'); var speed=jQuery(this).data('particles-speed'); var hover=jQuery(this).data('particles-hover'); var hover_mode=jQuery(this).data('particles-hover-mode'); switch (type){ case 'particles': type='circle'; break; case 'hexagons': type='polygon'; break; default: type='circle'; break; } if(color_type=='random_colors'){ color=color.split(','); color_line=color[0] } particlesJS( id, { "particles":{ "number":{ "value":number, "density":{ "enable":true, "value_area":800 }}, "color":{ "value": color }, "shape":{ "type":type, "polygon":{ "nb_sides":6 }, }, "opacity":{ "value":1, "random":true, "anim":{ "enable":false, "speed":1, "opacity_min":0.1, "sync":false }}, "size":{ "value":size, "random":true, "anim":{ "enable":false, "speed":30, "size_min": 1, "sync":false }}, "line_linked":{ "enable":lines, "distance":150, "color":color_line, "opacity":0.4, "width":1 }, "move":{ "enable":true, "speed":speed, "direction":"none", "random":false, "straight":false, "out_mode":"out", "bounce":false, "attract":{ "enable":false, "rotateX":600, "rotateY":1200 }} }, "interactivity":{ "detect_on":"canvas", "events":{ "onhover":{ "enable":hover, "mode":hover_mode }, "onclick":{ "enable":true, "mode":"push" }, "resize":true }, "modes":{ "grab":{ "distance":150, "line_linked":{ "opacity":1 }}, "bubble":{ "distance":200, "size":size*1.6, "duration":20, "opacity":1, "speed":30 }, "repulse":{ "distance":80, "duration":0.4 }, "push":{"particles_nb":4}, "remove":{"particles_nb":2}} }, "retina_detect":true }); var update; update=function(){ requestAnimationFrame(update); }; requestAnimationFrame(update); }) } function apcore_photo_gallery_justified(){ j$('body').find('.layout_justify_wrap').each(function (){ var _this=j$(this); var wrapper_class=_this.data('class'); j$(wrapper_class).justifiedGallery({ rowHeight:_this.data('rowheight'), lastRow:_this.data('lastrow'), margins:_this.data('margins'), captions: false, selector: 'a, li', waitThumbnailsLoad: true, imagesAnimationDuration: 300, sizeRangeSuffixes: { 'lt100':'_t', 'lt240':'_m', 'lt320':'_n', 'lt500':'', 'lt640':'_z', 'lt1024':'_b' }}); j$(this).addClass('loaded'); }); }; function apcore_photo_gallery_masonry_grid(){ j$('body').find('.photo_layout_wrap').each(function (){ var _this=j$(this); var wrapper_class=_this.data('class'); var $container2=j$(wrapper_class); $container2.imagesLoaded(function(){ $container2.animate({opacity:1}); $container2.isotope({ layoutMode: _this.data('layoutmode'), itemSelector: "."+_this.data('itemselector'), }) }); }); }; function apcore_morphing_img(){ j$('.apress_morphing_wrap').each(function(){ var _this=j$(this); var morphingduration=_this.data('morphingduration'); var uniqid=_this.data('uniqid'); var morphing=anime({ targets: "#apress_morphing_path"+uniqid, d: [ { value: "M1009.6,511.6c0,218.7-263.4,380.6-500.5,380.6S52.6,623.8,52.6,405.1S370.3,18.5,607.4,18.5S1009.6,292.9,1009.6,511.6z" }, { value: "M1062.1,502.6c0,218.7-239.9,355.5-477,355.5S43.6,637.3,43.6,418.6S480.2,39,717.3,39S1062.1,283.9,1062.1,502.6z" }, { value: "M1022.4,500.3c0,218.7-243.7,379.6-480.8,379.6S19,633.1,19,414.5S238.5,45.1,475.6,45.1S1022.4,281.6,1022.4,500.3z" }, { value: "M1009.6,511.6c0,218.7-263.4,380.6-500.5,380.6S26.7,626.5,26.7,407.8S370.3,18.5,607.4,18.5S1009.6,292.9,1009.6,511.6z" }, ], easing: "easeOutQuad", duration: morphingduration, loop: true, autoplay: true }); }); }; function apcore_video_lightbox(){ j$('.lightbox_type_video').each(function(){ var _this=j$(this); var id=_this.data('id'); j$("."+id).ApVideoPopUp({ autoplay: 1 }); }); }; function apcore_imagebox_auto_height(){ j$('.zolo_imagebox_new_wrapper').each(function(){ var id=j$(this).attr('id'); var $height=j$('#'+id+".zolo_imagebox_new_wrapper.new_imagebox_style12 .zolo_imagebox_new_des_wrap").outerHeight(); j$('#'+id+".zolo_imagebox_new_wrapper.new_imagebox_style12 .zolo_imagebox_new_content").css({bottom: -$height+'px'}); }); }; (function(){"use strict";function e(){}function t(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var i=e.prototype,r=this,s=r.EventEmitter;i.getListeners=function(e){var t,n,i=this._getEvents();if("object"==typeof e){t={};for(n in i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n])}else t=i[e]||(i[e]=[]);return t},i.flattenListeners=function(e){var t,n=[];for(t=0;t